I'm trying to change an input type onevent, but not having any luck. Is it possible?
Is can get the type by using
but I can't seem to change the type from here.Code:<p>
<input id="password" name="Password" type="text" value="Password" onclick="alert(this.type)"></input>
</p>
As an alternative I was thinking of usingAny suggestions? It's only so I can have "password" written in the input, which changes to ••••••••Code:<p>
<input id="password" name="Password" type="text" value="Password" onclick="this.parentElement.innerHTML='<input type=password value=password></input>'"></input>
</p>
when clicked.
