-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
executable file
·55 lines (40 loc) · 968 Bytes
/
template.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<title>Playtime</title>
<link rel=stylesheet href="style.css" type="text/css" media=screen>
<style>
#text-input {
width: 100%;
font-size: inherit;
padding: 1em;
margin: 0;
border-width: 0;
outline-width: 0;
clear: both;
background:#ccc;
position:fixed;
bottom:0;
left:0;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="http://localhost:8080/nowjs/now.js"></script>
<script>
$(document).ready(function(){
now.receiveMessage = function(message){
$("#messages").append("<br>" + message);
}
$('#text-input').keypress(function(event) {
if (event.keyCode == '13') {
now.distributeMessage($("#text-input").val());
$("#text-input").val("");
}
});
});
</script>
</head>
<body>
<div id="messages">Welcome to Hivechat!<br /></div>
<input type="text" id="text-input">
</body>
</html>