/ Published in: JavaScript
Expand |
Embed | Plain Text
// focus on the first text input field on the page $("input[type='text']:first", document.forms[0]).focus();
Comments
Subscribe to comments
You need to login to post a comment.

You can use :input as well — basically the same thing.
$(function(){$(":input[@type='text']:first").focus()})