亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

在線客服 前臺效果

Original 2019-04-04 17:28:17 195
abstrakt:<!doctype html><html lang="en"><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width,

<!doctype html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>Document</title>
   <style>
.content{width: 500px;margin: 0 auto;background-color: blue;padding-top: 20px;padding-bottom: 20px}
       .chat{width:400px;margin: 0 auto;height: 400px;background-color: #fff;}
       .send{width:400px;margin: 0 auto;margin-top: 20px;}
       .clear{overflow: hidden}
       textarea{resize: none;width: 270px;height: 50px;float: left}
       button{width: 120px;height: 55px;float: right;font-size: 20px}
       li{list-style: none;margin-top: 10px}
       li img{display: inline}
   </style>
</head>
<body>
<div class="content">
<!--聊天區(qū)-->
<div class="chat"><ul></ul></div>

<!--發(fā)送區(qū)-->
<div class="send clear">
       <textarea></textarea>
       <button id="send">發(fā)送</button>
   </div>
</div>
<script>
window.onload=function () {
       var sum=0;
var send=document.querySelector('#send');
var ul=document.querySelector('ul');
var info=[
           'hello,worde',
'我餓了',
'我要吃飯',
'你不是好人',
'pbp指紋鎖',
'我要回家  ',
'城市太露',
'我要回老家'
]

       send.onclick=function () {
           var tc=document.querySelector('textarea').value;
var li=document.createElement('li');
li.innerHTML="<img src=\"a.png\"/ style=\"border-radius:50%;width:25px;height:25px\">"+tc;
ul.appendChild(li);
sum++;

setTimeout(function () {
               //獲取info的隨機數(shù)據(jù)
var one=info[Math.floor(Math.random()*7)];//Math函數(shù)
var li0=document.createElement('li');
li0.innerHTML="<img src=\"b.png\"/ style=\"border-radius:50%;width:25px;height:25px\">"+one;
ul.appendChild(li0);
sum++;

if (sum>10){
                   ul.innerHTML='';
sum=0;
}
           },2000)
       }
   }




</script>
</body>
</html>

Korrigierender Lehrer:天蓬老師Korrekturzeit:2019-04-04 17:39:37
Zusammenfassung des Lehrers:"<img src=\"b.png\"/ style=\"border-radius:50%;width:25px;height:25px\">"+one; ul.appendChild(li0); 以后再遇到類似的情況 , 用外面用單引號就可以, 沒必要轉(zhuǎn)義的,影響執(zhí)行效率

Versionshinweise

Beliebte Eintr?ge