摘要:
客服系统 &n客服系统*{margin: 0;padding:0}
h2{font-weight:300;color:#fff;}
.contens{width:410px;margin:30px auto;background: rgb(55,146,245);text-align: center;padding-top:10px;border-radius:6px;}
.textarea{width: 380px;height: 500px;border:0px solid #ccc;margin:10px auto;padding-top:5px;background:#fff;}
.record li{list-style:none;text-align: left;margin:8px 15px;border:0px solid #ccc;line-height: 30px;font-size: 14px;}
.sendarea{width:380px;height:60px;line-height:60px;margin:10px auto;}
.sendtext{resize: none;width:300px;height:40px;float:left;border-radius: 4px;font-size: 18px;line-height: 40px;}
.btn{width:70px;height:40px;float:right;border-radius:4px;border:none;color:#fff;font-size: 16px;background:#ff6700;}
.btn:hover{font-size: 18px;cursor:pointer;}
在线客服系统
发送
var btn=document.getElementsByClassName('btn').item(0);
var sendtext=document.getElementsByClassName('sendtext').item(0);
var record=document.getElementsByClassName('record').item(0);
btn.οnclick=function(){
if(sendtext.value===''){
alert("输入内容为空");
}else{
var textcol=document.createElement('li');
var str='
textcol.innerHTML=str+''+sendtext.value+'
record.appendChild(textcol);
sendtext.value='';
}
setTimeout(function(){
var info=[
'真烦人,有话快说,别耽误我玩抖音',
'除了退费退款,什么都可以问',
'说的啥,小姑娘怎么听不懂',
'在我觉得方便的时候再回复你',
'投诉我的多了,你算老几....',
]
var temp=info[Math.floor(Math.random()*4)];
var textcol=document.createElement('li');
var str=''
textcol.innerHTML=str+''+temp+'
record.appendChild(textcol);
},2000);
}
批改老师:查无此人批改时间:2019-06-10 10:15:26
老师总结:完成的不错。客服系统完成后,可以想想客户与客户之间的聊天系统。继续加油。