Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Password </title>
- <script type="text/javascript">
- function toggle(target){
- var d=document;
- var pass=d.getElementById("password");
- var text=d.getElementById("showhide");
- if(text.innerHTML=='show'){
- pass.setAttribute('type','text');
- text.innerHTML='hide';}
- else
- {
- pass.setAttribute('type','password');
- text.innerHTML='show';
- }
- }
- </script>
- </head>
- <body style="background-color:grey">
- <form>
- UserName: <input type="text" name="textname" maxwidth=30>
- <br><br>
- Password: <input type="password" id="password" maxwidth=8>
- <br><br>
- <a href="#" onclick=toggle(password) id="showhide">show</a>
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment