abstrait:總結(jié):1創(chuàng)建好一個(gè)ul用于顯示提交問(wèn)題以及回答問(wèn)題。2創(chuàng)建一個(gè)文本框用于輸入問(wèn)題3創(chuàng)建一個(gè)按鈕用于提交發(fā)送問(wèn)題4在js腳本里獲取一下頁(yè)面上第一個(gè)按鈕并賦值給變量btn5在js腳本里獲取一下輸入框并賦值給text變量6在js腳本里獲取一下ul并賦值給變量list7創(chuàng)建一個(gè)計(jì)數(shù)變量sum用于計(jì)數(shù)<!DOCTYPE html> <html> <head> &
總結(jié):
1創(chuàng)建好一個(gè)ul用于顯示提交問(wèn)題以及回答問(wèn)題。
2創(chuàng)建一個(gè)文本框用于輸入問(wèn)題
3創(chuàng)建一個(gè)按鈕用于提交發(fā)送問(wèn)題
4在js腳本里獲取一下頁(yè)面上第一個(gè)按鈕并賦值給變量btn
5在js腳本里獲取一下輸入框并賦值給text變量
6在js腳本里獲取一下ul并賦值給變量list
7創(chuàng)建一個(gè)計(jì)數(shù)變量sum用于計(jì)數(shù)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <style> div:nth-child(1){ width: 450px; height: 650px; background: lightskyblue; margin:30px auto; color: #333; box-shadow: 2px 2px 2px #808080; } h2{ text-align: center; margin-bottom:-10px; } div:nth-child(2){ width: 400px; height: 500px; border:4px double green; background: #efefef; margin:20px auto 10px; } ul{ list-style: none; line-height: 2em; overflow: hidden; padding:15px; } table{ width: 90%; height: 80px; margin:auto; } textarea{ border: none; resize:none; background: lightyellow; } button{ width: 60px; height: 40px; background: seagreen; color:white; border: none; } button:hover{ cursor: pointer; background: orange } </style> </head> <body> <div class=""> <h2>在線客服</h2> <div class=""> <ul> <li></li> </ul> </div> <table> <tr> <td> <textarea name="text" id="" cols="50" rows="4"></textarea> </td> <td> <button type="button">發(fā)送</button> </td> </tr> </table> </div> <script type="text/javascript"> let btn = document.getElementsByTagName('button')[0] let text = document.getElementsByName('text')[0]; let list = document.getElementsByTagName('ul')[0]; let sum = 0; </script> </body> </html>
Professeur correcteur:查無(wú)此人Temps de correction:2019-04-16 09:37:23
Résumé du professeur:完成的不錯(cuò)。以后學(xué)了php,就可以從數(shù)據(jù)庫(kù)拿回復(fù)話了。像京東那樣機(jī)器回復(fù)。