<html> <head>

  <script type="text/javascript">

    // make global reference
    var serial;

    function setup()
      // instantiate seriality
      serial = (document.getElementById("seriality")).Seriality();

      // begin serial communications on first known port at 9600 baud
      serial.begin(serial.ports[0], 9600);

      // write a '-' to set the initial state of the LED to off

      // note the use of 'onload' and 'onclick' below...


</head> <body onload="setup()">

  <object type="application/Seriality" id="seriality" width="0" height="0"> </object>

    ON <input type="radio" name="led" value="on" onclick="serial.write('!');"><br/>
    OFF <input type="radio" name="led" value="off" onclick="serial.write('-');" checked="checked">

</body> </html>