html head title iChat title meta charset UTF-8 script function clickMe

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<html>
<head>
<title>iChat</title>
<meta charset='UTF-8'>
<script>
function clickMe()
{
var date = new Date();
document.getElementById('chat').innerHTML += document.getElementById('message').value + '<br>';
document.getElementById('message').value = '';
}
</script>
</head>
<body>
<input type='text' id='message'/>
<button type="button" onclick="clickMe();" >Отправить</button>
<div id='chat'></div>
</body>
</html>