I have a form with some text fields,and I want to place the cursor (auto focus) on first text field of form when page gets loaded.
I want to do it without using javascript.
Ya its possible to do without support of javascript.. We can use html5 auto focus attribute For Example:
<input type="text" name="name" autofocus="autofocus" id="xax" />
If use it (autofocus="autofocus") in text field means that text field get focused when page gets loaded.. For more details: http://www.hscripts.com/tutorials/html5/autofocus-attribute.html
1.4m articles
1.4m replys
5 comments
57.0k users