Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Garage Door Control</title>
- <script src="jquery.min.js"></script>
- <script>
- function clicker() {
- $.ajax({
- type: 'POST',
- url: 'dooropen.php',
- });
- $(".garage").prop("disabled",true);
- $(".reset").prop("disabled",false);
- document.body.style.backgroundColor = "green";
- }
- function reset() {
- $(".garage").prop("disabled",false);
- $(".reset").prop("disabled",true);
- document.body.style.backgroundColor = "transparent";
- }
- </script>
- </head>
- <body>
- <div class="box">
- <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>
- <button class="reset" onclick="reset()" disabled="true" style="width: 200px; height: 200px; font-size :30px"> RESET </button>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement