Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. html = """<!DOCTYPE html>
  2. <html>
  3.    <head>
  4.        <title>Yunshan Interface by MASUGUX</title>
  5.        <script>
  6.            var ON  = 1;
  7.            var OFF = 0;
  8.            function turnRelay(state){
  9.                if (state == ON){
  10.                    var location_now = window.location.hostname;
  11.                    window.location.replace("/?relay=on");
  12.                }
  13.                else if (state == OFF){
  14.                    var location_now = window.location.hostname;
  15.                    window.location.replace("?relay=off");
  16.                }
  17.            }
  18.        </script>
  19.    </head>
  20.    <body>
  21.        <h1>Interface de controle</h1>
  22.    <br>
  23.    <h3>MASUGUX e Do bit Ao Byte</h3>
  24.        <table border="0">
  25.          <tr>
  26.              <th>
  27.              <button type="button" onclick="turnRelay(ON)">Ligar</button>
  28.              </th>
  29.              <th>
  30.              <button type="button" onclick="turnRelay(OFF)">Desligar</button>
  31.              </th>
  32.          </tr>
  33.        </table>
  34.    </body>
  35. </html>
  36. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement