开发者

setfocus the data in textfield after scan barcode

开发者 https://www.devze.com 2023-01-22 19:44 出处:网络
i\'m u开发者_高级运维sing jQuery for my task. Then i\'m using barcode scanner for input data into my input form.

i'm u开发者_高级运维sing jQuery for my task. Then i'm using barcode scanner for input data into my input form. how do i do to show data(setfocus) in the 2nd textfield, if i have two textfields inside this form?


You can use :eq() or .eq() to get the second <input> then call .focus(), like this:

$("form input:text:eq(1)").focus()

Note that it's 1 because it's a 0-based index.

0

精彩评论

暂无评论...
验证码 换一张
取 消