<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>客服文本框</title>
<style>
.box{
width: 450px;
height: 650px;
background: lightblue;
margin: 0 auto;
}
#text1{
width: 371px;height: 64px;background: lightyellow;margin-left: 5px;float: left;
}
.bt1{
width: 60px;height: 40px;background: black;color: white;}
h2{
text-align: center;
}
.bt1:hover{
background: orange;
}
.box1{
height: 500px;width: 400px;background: #ccc;border: 1px solid black;margin: 10px auto;color: black;
}
</style>
</head>
<body>
<div class="box">
<h2>在线客服</h2>
<div class="box1">
<ul></ul>
</div>
<textarea name="info" id="text1" cols="30" rows="10"></textarea>
<button class="bt1">提交</button>
</div>
<!-- <script>
let text=document.getElementsByName('info')[0];
let button=document.getElementsByTagName('button')[0];
let ul=document.getElementsByTagName('ul')[0];
button.onclick=function(){
let li=document.createElement('li');
li.innerHTML=text.Value;
ul.appendChild('li');
text.Value='';
}
</script> -->
</body>
</html>