abstrak:<!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, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>DOM: 模擬智能在線客服系統(tǒng)</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; padding-top: 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; border: none; background: seagreen; color: white; margin-left: 5px; } button:hover{ cursor: pointer; background: orange; } </style> </head> <body> <div> <h2>在線客服</h2> <div> <ul> <li></li> </ul> </div> <table> <tr> <td align="right"><textarea name="text" cols="50" rows="4"></textarea></td> <td align="left"><button type="button">發(fā)送</button></td> </tr> </table> </div> <script> //1. 獲取相關(guān)元素 let btn = document.getElementsByTagName('button')[0]; let text = document.getElementsByName('text')[0]; let ul = document.getElementsByTagName('ul')[0]; let count = 0; //計(jì)數(shù)器 </script> </body> </html>
Guru membetulkan:查無(wú)此人Masa pembetulan:2019-05-05 10:18:54
Rumusan guru:完成的不錯(cuò)。常用的css樣式,可以寫(xiě)到一個(gè)公用文件里,隨時(shí)可以使用。繼續(xù)加油。