开发者

setfocus the data in textfield after scan barcode

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜