-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartpage.html
More file actions
1 lines (1 loc) · 1.29 KB
/
startpage.html
File metadata and controls
1 lines (1 loc) · 1.29 KB
1
<!doctype html><html><head> <meta charset="utf-8"> <title>Mini Kame</title> <style> div { width: 100%; height: 400px; } div div { width: 33%; height: 33%; outline: 1px solid; float: left; font-size: 24px; color: white; text-align: center; line-height: 500%; } .cB { background-color: black; } .cBStop { background-color: gray; } .cBDir { background-color: orange; } </style> <script type="text/javascript"> function fireCommand(value) { document.getElementById(value).style.background = "black"; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4) { document.getElementById(value).style.background = ''; }}; xhttp.open("GET", "cmd.html?command="+value, true); xhttp.send(); } </script></head><body><div> <div class="cB" id="01" onclick="fireCommand('01')" >Mad</div> <div class="cBStop" id="02" onclick="fireCommand('02')">Calm</div> <div class="cBDir" id="03" onclick="fireCommand('03')">Nice</div></div></body></html>