focus doesn't work in IE

Posted by Syom on Stack Overflow See other posts from Stack Overflow or by Syom
Published on 2010-04-08T13:29:10Z Indexed on 2010/04/08 13:33 UTC
Read the original article Hit count: 188

Filed under:
|
|
|

i have the following function

 function change() 
            {
                var input=document.getElementById('pas');
                var input2= input.cloneNode(false);
                input2.type='password';
                input.parentNode.replaceChild(input2,input);
                input2.focus();
            }

but focus() doesn't work in ie7, so what can i do! i want to have the cursor inside of input! thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery