Detect HTML5 attribute:How to implement and use autofous attribute in IE7 and IE8.

HTML5 Video tag supports on IE 8As we know the new HTML5 autofocus attribute helps  the browser to give focus to the form element. It helps to jump to the autofocused input box while our page loads.While I was checking that <input> autofocus attribute in my browser (I am using IE8) I found that IE8  is not detecting that attribute.But, I have got a solution, a tricky and way, to use and implement  autofocus attribute in IE8. Just copy the given code and save it as .html  file and check it.


<script type=”text/javascript” src=””></script>

<script type=”text/javascript”>
        //  Focus auto-focus fields
<form action=”demo_form.asp”>
First name:<input type=”text” name=”fname”  /><br />
Last name: <input type=”text” name=”lname”  /><br />
<input type=”submit” />



HTML5 Autofocus detection in IE

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: