Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.89 KB | None | 0 0
  1. <html>
  2.  <head>
  3.   <title>Garage Door Control</title>
  4.   <script src="jquery.min.js"></script>
  5.   <script>
  6.   function clicker() {
  7.    $.ajax({
  8.         type: 'POST',
  9.         url: 'dooropen.php',
  10.    });
  11.    $(".garage").prop("disabled",true);
  12.    $(".reset").prop("disabled",false);
  13.    document.body.style.backgroundColor = "green";
  14.   }
  15.   function reset() {
  16.    $(".garage").prop("disabled",false);
  17.    $(".reset").prop("disabled",true);
  18.    document.body.style.backgroundColor = "transparent";
  19.   }
  20.   </script>
  21.  </head>
  22.  <body>
  23.  <div class="box">
  24.   <button class="garage" onclick="clicker()" style="width: 450px; height: 450px; font-size :50px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);"> GARAGE BUTTON </button>
  25.   <button class="reset" onclick="reset()" disabled="true" style="width: 200px; height: 200px; font-size :30px"> RESET </button>
  26.  </div>
  27.  </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement