-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-message.html
More file actions
53 lines (49 loc) · 2.32 KB
/
test-message.html
File metadata and controls
53 lines (49 loc) · 2.32 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
<!DOCTYPE html>
<html>
<head>
<title>Test Message</title>
<link rel="stylesheet" href="./css/message.css">
</head>
<body>
<div class="message-body" id="message-body">
<div class="msg-content msg-recieve">MSfd ssdfsssssssssgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdddadafgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfsssssssssssss sssssssssssssssss
ssssssssssssss s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-recieve">MSfd ssdfgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfsssssssssssss sssssssssssssssss
ssssssssssssss s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-recieve">MSfd ssdfsssssssssgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdddadafgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfsssssssssssss sssssssssssssssss
ssssssssssssss s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-recieve">MSfd ssdfgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfg s<time>2017/05/27 15:21:01</time></div>
<div class="msg-content msg-send">MSfd ssdfgsdfdf sdfg sdfsssssssssssss sssssssssssssssss
ssssssssssssss s<time>2017/05/27 15:21:01</time></div>
</div>
<div class="message-control">
<input type="text" id="message_text"></input>
<button id="btn_message_send">Command</button>
</div>
</body>
<script type="text/javascript">
function gotoBottom(id){
var element = document.getElementById(id);
for(var i = 0; i <= element.clientHeight; i++)
{
element.scrollTop = element.scrollHeight - i;
}
}
function message_body_scrollDown()
{
var element = document.getElementById("message-body");
element.scrollTop = element.scrollHeight - element.clientHeight;
console.log("scrollHeight...");
}
document.getElementById("btn_message_send").onclick = function () {
setTimeout(message_body_scrollDown, 100);
}
</script>
</html>