You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!doctype html> <html>
<head> <meta charset="utf-8"> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script> <script src="../js/zcmd.js"></script> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>唤醒测试</title> <style> </style> <script> </script> </head>
<body> <script> var zcmd = new ZCommand(); zcmd.set_onSendraw(function (data) { console.log("zcmd send:" + JSON.stringify(data, null, 0)); }); zcmd.set_onReceipt(function (tx, rx) { console.log("zcmd receipt:" + JSON.stringify(rx, null, 0)); }); </script>
<div> <h1>唤醒测试</h1> <table> <tr> <td>triggerWakeup</td> <td>-</td> <td><button onclick='zcmd.send_message({"command": "triggerWakeup"},2000).then((data) => {alert(JSON.stringify(data,null,2))})'>Trigger</button> </td> </tr> </table> </div>
<script> $(function () { // ZWSURL = "ws://127.0.0.1:19000"; zcmd.start_auto_connect(ZWSURL); }); </script>
</body>
</html>
|