Created
June 30, 2025 08:38
-
-
Save xinglongjizi/445c9b646c445128547768d7704a0353 to your computer and use it in GitHub Desktop.
input、textarea通过js获取焦点,且光标处于文本末尾的处理方式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| $textarea.focus(); | |
| $textarea.value = res?.data?.remark ?? ''; | |
| 先获取焦点 | |
| 再赋值 | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment