</h1> <h2>Status: <code id="statusField">NO-STATUS</code></h2> <div>Set a server URL, then push "Connect" button to establish a connection. <br>"Send" button sends text message on the left text area. <br>"Close" button closes the connection. <div> <form id="connectForm"> <input type="text" id="url" style="width: 400px" value="ws://html5rocks.websocket.org/echo?encoding=text"> <input type="submit" value="Connect"> </form> <form id="sendForm"> <input type="text" id="message" value="hello" style="width: 400px"> <input type="submit" value="Send"> </form> <button id="closeButton">Close</button> <div id="listener"></div> <div id="log"></div> </body> </html>