[go: up one dir, main page]

Menu

[r18]: / trunk / ajax.html  Maximize  Restore  History

Download this file

67 lines (63 with data), 1.5 kB

 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
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ajax demo</title>
<script type="text/javascript" src="ratax.js"></script>
<script type="text/javascript" src="ajax.js"></script>
<style type="text/css">
#about { display: none; }
#scroll {
border: 1px solid black;
overflow: auto;
height: 40ex;
margin-bottom: 8px;
}
#scroll p {
margin: 0;
padding: 2px 2px;
font-family: Tahoma;
font-size: 11px;
}
.timestamp, .channel {
font-size: 9px;
margin-right: 4px;
color: #888;
}
.username {
font-weight: bold;
padding-right: 3px;
}
.msg {
}
.sysmsg {
color: #88f;
font-style: italic;
}
</style>
<script type="text/javascript">
function $id(id) { return document.getElementById(id); }
/* Inicializar el script */
function init() {
chat.setInput( $id('say') );
chat.setOutput( $id('scroll') );
chat.startPolling();
}
</script>
</head>
<body onload="init();">
<div id="channel">
<div id="scroll">
</div>
<form action="" method="post">
<div id="input">
<input type="text" id="say">
<!--
<input type="button" value="send" >
<input type="button" value="get" >
-->
</div>
</form>
</div>
</body>
</html>