1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>IRremote Controller</title>
- </head>
- <body>
- <h1>IRremote Controller</h1>
- <h3>TV:</h3>
-
- <p>
- <button type="button" onclick="sendCommandTV('power')">Power</button><br>
- <button type="button" onclick="sendCommandTV('back')">Back</button> <button type="button" onclick="sendCommandTV('home')">Home</button><br>
- <button type="button" onclick="sendCommandTV('up')">/\</button><br>
- <button type="button" onclick="sendCommandTV('left')"><</button> <button type="button" onclick="sendCommandTV('ok')">Ok</button> <button type="button" onclick="sendCommandTV('right')">></button><br>
- <button type="button" onclick="sendCommandTV('down')">\/</button><br>
- <button type="button" onclick="sendCommandTV('reload')">Reload</button> <button type="button" onclick="sendCommandTV('star')">*</button><br>
- <button type="button" onclick="sendCommandTV('rewind')"><<</button> <button type="button" onclick="sendCommandTV('play-pause')">Play/Pause</button> <button type="button" onclick="sendCommandTV('fast-forward')">>></button><br>
- <button type="button" onclick="sendCommandTV('vol+')">Vol +</button> <button type="button" onclick="sendCommandTV('mute')">Vol Mute</button> <button type="button" onclick="sendCommandTV('vol-')">Vol -</button><br>
- </p>
- <h3>MOVIE BOX:</h3>
- <p>
- <button type="button" onclick="sendCommandMB('power')">Power</button><br>
- <button type="button" onclick="sendCommandMB('home')">Home</button> <button type="button" onclick="sendCommandMB('back')">Back</button><br>
- <button type="button" onclick="sendCommandMB('up')">/\</button><br>
- <button type="button" onclick="sendCommandMB('left')"><</button> <button type="button" onclick="sendCommandMB('ok')">Ok</button> <button type="button" onclick="sendCommandMB('right')">></button><br>
- <button type="button" onclick="sendCommandMB('down')">\/</button><br>
- </p>
- <script>
- function sendCommandTV(cmd) {
- const xhttp = new XMLHttpRequest();
- xhttp.onload = function() {}
- xhttp.open("GET", "tv/"+cmd, true);
- xhttp.send();
- }
- function sendCommandMB(cmd) {
- const xhttp = new XMLHttpRequest();
- xhttp.onload = function() {}
- xhttp.open("GET", "mb/"+cmd, true);
- xhttp.send();
- }
- </script>
- </body>
- </html>
|