javascript - Setting focus on an html element in Internet Explorer -
I
trying to set focus on text input element using document I am GetElementById ('id'). Focus () It works in Firefox 3, but does not work in Internet Explorer 8.
What is the correct way to set up focus on an HTML element in Internet Explorer?
Are you sure there is no other problem in your code? I do not have IE8 to test, but this self-evident example works perfectly in IE7 - maybe you can see it in IE8?
& lt; Html & gt; & Lt; Body & gt; & Lt; Form & gt; & Lt; Input type = 'text' id = 'bim' & gt; & Lt; / Form & gt; & Lt; Script & gt; Document.getElementById ('BIM') Focus (). & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment