How to do this through the tag itself change type from text to password
<input type='text' name='pass' />
Is it possible to insert JS inside the input tag itself to change type='text' to type='password'?
How to do this through the tag itself change type from text to password
<input type='text' name='pass' />
Is it possible to insert JS inside the input tag itself to change type='text' to type='password'?
Here is what I have for mine.
Essentially you are utilizing the onfocus and onblur commands in the tag to trigger the appropriate javascript. It could be as simple as:
An evolved version of this basic functionality checks for and empty string and returns the password input back to the original "Password" in the event of a null textbox:
Where HTML looks like: