Advertisement
Guest User

Untitled

a guest
May 4th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. $(document).ready(function() {
  2. $(window).unload(saveSettings);
  3. loadSettings();
  4. });
  5. function loadSettings() {
  6. $('#password').val(localStorage.password);
  7. $('#siteName').val(localStorage.siteName);
  8. $('#siteURL').val(localStorage.siteURL);
  9. $('#user').val(localStorage.user);
  10.  
  11. }
  12. function saveSettings() {
  13. localStorage.password = $('#password').val();
  14. localStorage.siteName = $('#siteName').val();
  15. localStorage.siteURL = $('#siteURL').val();
  16. localStorage.user = $('#user').val();
  17. }
  18. <p>
  19.  
  20. <form id="form" name="passform" method="post" action="http://localhost/diarrhea/dbProcess.php" >
  21.  
  22. <p><input id="Gbutton" type="button" value="Generate password" ></p>
  23. <p><input type="password" id="password" name="passbox" tabindex="1" size="20"> </p>
  24.  
  25. <div style="font-size:14px ;margin-bottom:15px;">
  26. <input type="checkbox" id="check" > show password
  27. &nbsp;&nbsp;&nbsp;<input class="copy_Button " type="button" value="Copy" id="copyButton" >&nbsp;
  28.  
  29.  
  30. </div>
  31.  
  32. <table style="font-size:15px ">
  33.  
  34. <tr>
  35. <td> Site name </td></tr>
  36. <tr>
  37. <td>
  38. <input style=" font-size:15px;" type="text" name="siteName" id="siteName"/>
  39. </td>
  40. </tr>
  41.  
  42.  
  43. <tr> <td>
  44. Site login URL </td></tr>
  45. <tr> <td> <input style=" font-size:15px; " type="url" name="siteURL" id="siteURL"/>
  46. </td> </tr>
  47.  
  48. <tr>
  49. <td>
  50. Email/User name </td></tr>
  51. <tr><td> <input style=" font-size:15px;" type="text" name="user" id="user"/>
  52. </td>
  53. </tr>
  54. <tr><td> <input type="hidden" id="validation" name="validation"/>
  55. </td></tr>
  56. <tr>
  57. <td>
  58. <input class="copy_Button " type="reset" value="Clear" id="clear" >&nbsp;
  59. <input class="copy_Button " type="button" value="Help" id="help" >&nbsp;
  60. <input class="copy_Button " type="submit" value="Save" id="save" >&nbsp;
  61. </td> </tr>
  62. </table>
  63. </form>`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement