Office Address

41/D, West Brahmondi, Narsingdi

Phone Number

+880-1975374887

Email Address

dynamicweblab@gmail.com

  • September 15, 2012
  • HTML5

HTML5 allows us input autofocus attribute on elements when page loads.
This is accomplished by using the autofocus attribute.
Using this autofocus attribute the INPUT, TEXTAREA, or BUTTON element will be automatically selected on page load.

The best part is no JavaScript is needed.

This autofocus attribute can be set using this 3 ways :

[php] <input autofocus>
<input autofocus="autofocus">
<input autofocus="">
[/php]

The autofocus attribute is supported in all major browsers, except Internet Explorer.

Written by

Maidul Islam

I am a freelance web developer.Like to share what i learn.