changing input type dynamically

the code is in js 1. var input=document.getElementById(id); 2. var input2= input.cloneNode(false); 3. input2.type=’password’; 4. input.parentNode.replaceChild(input2,input);

Follow

Get every new post delivered to your Inbox.