Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- <title>Wi-Fi Button</title>
- <style>
- body {
- font-family: sans-serif;
- color: #555;
- background-color: #eee;
- width:100%;
- }
- </style>
- <script language="javascript">
- function loadXMLDoc(stat) {
- var xmlhttp;
- try {
- xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e) {
- try {
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (E) {
- xmlhttp = false;
- }
- }
- if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
- xmlhttp = new XMLHttpRequest();
- }
- xmlhttp.open("GET","load=" + stat + ".pht",true);
- xmlhttp.send();
- }
- </script>
- </head>
- <body>
- <hr />
- <p style="text-align: center;">Освещение</p>
- <button onclick="loadXMLDoc('0')" style="width:40%; height:150px; background-color:#f00;text-align: center;">OFF</button>
- <button onclick="loadXMLDoc('1')" style="width:40%; height:150px; background-color:#0f0;text-align: center;">ON</button>
- <p style="text-align: center;">Подсветка</p>
- <button onclick="loadXMLDoc('3')" style="width:40%; height:150px; background-color:#f00;text-align: center;">OFF</button>
- <button onclick="loadXMLDoc('2')" style="width:40%; height:150px; background-color:#0f0;text-align: center;">ON</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement