在线客服聊天测试

原创 2019-01-18 19:34:19 326
摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>聊天信息列表</title> <style type="text/css"> .txt{width: 425px;h
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>聊天信息列表</title>
<style type="text/css">
.txt{width: 425px;height: 540px;padding:10px;margin:0px auto;border:1px solid #eee;border-radius: 15px;background: pink;}
.txt-1{border:1px solid #ff6b00;border-radius: 15px;margin-bottom: 20px;width: 420px;height: 400px;box-shadow: 3px 3px 3px #ccc;background: #fff;}
input{width: 300px;height: 30px;}
button{width: 80px;height: 36px;background:blue;color: #fff;}
button:hover{background: #ff6b00;}
li{list-style: none;}
</style>
</head>
<body>
<div>
<h3>在线客服</h3>
<div>
<ul>
<li></li>
</ul>
</div>
<input type="text">
<button>发送</button>
</div>
<script>
var ul=document.getElementsByTagName('ul')[0];
var input=document.getElementsByTagName('input')[0];
var btn=document.getElementsByTagName('button')[0];
btn.onclick=function(){
var li=document.createElement('li');
li.innerHTML="<img src='new!.gif' >"+input.value;
ul.appendChild(li);
input.value="";
}
</script>
</body>
</html>


批改老师:灭绝师太批改时间:2019-01-19 09:07:01
老师总结:完成的不错,样式布局可以讲究点哦!继续加油!

发布手记

热门词条