2013-08-01 43 views

回答

0

查看Google代碼網站,本網站包含可用於安裝Seriality.plugin文件的DMG文件。

https://code.google.com/p/seriality/

你也可以看到,顯示的JavaScript使用的插件網站上的樣品來源,以下是該網站上顯示的代碼片段輸出「Hello World」到第一個端口在系統上看到的此HTML文件加載時,波特率爲9600。

<html> 
<head> 
    <script type="text/javascript"> 
    function setup() 
    { 
     var serial = (document.getElementById("seriality")).Seriality(); 
     serial.begin(serial.ports[0], 9600); 
     serial.write("Hello World"); 
    } 
    </script> 
</head> 
<body onload="setup();"> 
    <object type="application/Seriality" id="seriality" width="0" height="0"></object> 
</body> 
</html>