Guest User

Untitled

a guest
Jul 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <html>
  2. <title></title>
  3. <header>
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. <script src="node_modules\jquery\dist\jquery.js" onload="window.$ = window.jQuery = module.exports;"></script>
  11.  
  12. <script src="node_modules\bootstrap\dist\js\bootstrap\bootstrap.bundle.js" type="javascript/text"></script>
  13. <link rel="stylesheet" href="node_modules\bootstrap\dist\css\bootstrap.css">
  14. <script src="login.js" type="javascript/text"></script>
  15.  
  16.  
  17. <script>
  18. $(function(){
  19.  
  20.  
  21. $("#username").keyup(function(){
  22. console.log($("#username").val().length);
  23. if ($("#username").val().length >= 6 && $("#password").val().length >= 6)
  24. {
  25. $("#submitbutton").removeAttr("disabled");
  26. }
  27. else if ($("#username").val().length <= 6 || $("#password").val().length <= 6)
  28. {
  29. $("#submitbutton").attr("disabled","disabled");
  30. }
  31. })
  32.  
  33.  
  34. $("#password").keyup(function(){
  35. console.log($("#username").val().length);
  36. if ($("#username").val().length >= 6 && $("#password").val().length >= 6)
  37. {
  38. $("#submitbutton").removeAttr("disabled");
  39. }
  40. else if ($("#username").val().length <= 6 || $("#password").val().length <= 6)
  41. {
  42. $("#submitbutton").attr("disabled","disabled");
  43. }
  44.  
  45. })
  46.  
  47. });
  48.  
  49.  
  50. </script>
  51.  
  52.  
  53.  
  54. </header>
  55.  
  56.  
  57.  
  58. <body>
  59.  
  60.  
  61. <div class="container" style="border:1px black solid; width:500px;background-color:rgb(131, 99, 173);border-radius:3px; margin-top:190px;">
  62.  
  63. <div class="row">
  64. <div class="col"><img src = "Pictures/instagramlogo.png" style="display:block;margin:auto;width:50%;height:auto;" /></div>
  65. </div>
  66.  
  67.  
  68. <div class="row">
  69. <div class="col" style="text-align:center;padding-top:10px;"><input type="text" id="username" name="username" placeholder="Username" style="text-align:center;width:60%"/></div>
  70. </div>
  71. <div class="row">
  72. <div class="col" style="text-align:center;padding-top:20px;"><input type="password" id="password" name="password" placeholder="Password" style="text-align:center;width:60%"/></div>
  73. </div>
  74.  
  75. <div class="row">
  76. <div class="col" style="text-align: center;padding:2%;padding-top:3%;">
  77. <button onclick="login();" class="btn btn-primary" id="submitbutton" disabled style="width:125px" value="LogIn"/>LogIn</button></div>
  78. </div>
  79.  
  80. </div>
  81.  
  82.  
  83. </form>
  84.  
  85. </body>
  86.  
  87.  
  88.  
  89. </html>
Add Comment
Please, Sign In to add comment