-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweb_client.html
36 lines (35 loc) · 944 Bytes
/
web_client.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>WebSocket test</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/websocket_client.js"></script>
<script type="application/javascript">
$(function () {
var YOUR_IP = "unit-489"; // Set your IP here
AsyncChat($("#people_in_chat"), $("#console"), $("#my_form"), YOUR_IP);
});
</script>
<style type="text/css">
ul#console {
height: 500px;
overflow: scroll;
background-color: antiquewhite;
}
</style>
</head>
<body>
<p>
People in da chat: <span id="people_in_chat"></span>
</p>
<ul id="console">
</ul>
<form id="my_form">
<label>
Text: <input type="text" id="input_box"/>
<input type="submit" value="say"/>
</label>
</form>
</body>
</html>