-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype_box.html
22 lines (22 loc) · 923 Bytes
/
type_box.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<meta http-equiv="pragma" content="no-cache" />
<head>
<script src="chat.js"></script>
</head>
<body>
<script>
var from_user = parent.document.getElementsByName("from_user")[0];
var to_user = parent.document.getElementsByName("to_user")[0];
function enter_msg(value, keyCode) {
if(keyCode == 13) {
sendmessage(from_user.value, to_user.value, value, function() {
insert_msg(from_user.value, value, new Date().valueOf()/1000);
var msg = document.getElementById("msg");
msg.value = "";
});
}
}
</script>
<input type="textarea" id="msg" name="message" value="" style="text-align:top;width:100%;height:100%" onkeydown="enter_msg(value, event.keyCode)"></input>
</body>
</html>