After my user enters text into a form field I want to force the cursor to jump to the next field, by doing something like
$('#senderName').focus();
This works as long as the next field is an input
element. It doesn't work when the next input is a textarea
. Is there any way to force the cursor to jump to a textarea
?
Thanks
将tabindex=1
添加到textarea
。
<textarea id="senderName" tabindex="1"></textarea>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.