Advertisement
petetong

Untitled

Dec 24th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <input type="password" name="password" id="myPassword" size="30" />
  2. <img src="theicon" onmouseover="mouseoverPass();" onmouseout="mouseoutPass();" />
  3.  
  4. function mouseoverPass(obj) {
  5. var obj = document.getElementById('myPassword');
  6. obj.type = "text";
  7. }
  8. function mouseoutPass(obj) {
  9. var obj = document.getElementById('myPassword');
  10. obj.type = "password";
  11. }
  12.  
  13. <input name="password" class="password" type="password" />
  14. <div class="icon">icon</div>
  15.  
  16. $('.icon').hover(function () {
  17. $('.password').attr('type', 'text');
  18. }, function () {
  19. $('.password').attr('type', 'password');
  20. });
  21.  
  22. <form>
  23. <label for="username">Username:</label>
  24. <input id="username" name="username" type="text" placeholder="Username" />
  25. <label for="password">Password:</label>
  26. <input id="password" name="password" type="password" placeholder="Password" />
  27. <input id="submit" name="submit" type="submit" value="Login" />
  28. </form>
  29.  
  30. <script>
  31. function seetext(x){
  32. x.type = "text";
  33. }
  34. function seeasterisk(x){
  35. x.type = "password";
  36. }
  37. </script>
  38. <body>
  39. <img onmouseover="seetext(a)" onmouseout="seeasterisk(a)" border="0" src="smiley.gif" alt="Smiley" width="32" height="32">
  40. <input id = "a" type = "password"/>
  41. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement