Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf HTTPServer RPCInterface RemoteIR mbed
You are viewing an older revision! See the latest version
Homepage
回路図¶
HTML¶
html
<html>
<head>
<script src="mbedRPC.js" language="javascript"></script>
<script type="text/javascript">
mbed = new HTTPRPC();
light1 = new RPCFunction(mbed,"light1");
light2 = new RPCFunction(mbed,"light2");
aircon = new RPCFunction(mbed,"aircon");
</script>
</head>
<body>
<br>
<input type="button" name="Light1 ON" value="Light1 ON" onClick="buttonClicked()"><br>
<input type="button" name="Light2 ON" value="Light2 ON" onClick="buttonClicked2()"><br>
<input type="button" name="Air-Con ON" value="Air-Con ON" onClick="buttonClickedAir()"><br>
<script language="javascript">
function buttonClicked(){
/*alert("送信")*/
light1.run(" ");
}
function buttonClicked2(){
/*alert("送信")*/
light2.run(" ");
}
function buttonClickedAir(){
/*alert("送信")*/
aircon.run(" ");
}
</script>
</body>
</html>