September 2013
Intermediate to advanced
548 pages
12h 25m
English
Our next example has a scrollable text area for displaying data and an entry. When you enter text in the entry and press the carriage return, a message is sent to the browser. The browser responds with a message that updates the display.

The HTML code for this is as follows:
| websockets/interact1.html | |
| | <script type="text/javascript" src="./jquery-1.7.1.min.js"></script> |
| | <script type="text/javascript" src="./websock.js"></script> |
| | <link rel="stylesheet" href="./interact1.css" type="text/css"> |
| | <body> |
| | <h2>Interaction</h2> |
| | <div id="scroll"></div> |
| | <br> |
| | <input id="input" class= ... |
Read now
Unlock full access