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

模擬智能在線客服第一部分:

Original 2019-03-16 22:25:06 263
abstract:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&

<!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實戰(zhàn):模擬智能在線客服系統(tǒng)</title>

</head>

<style>

*{margin: 0;padding: 0;}

div:nth-child(1){

width: 450px;

height: 650px;

background: lightskyblue;

margin: 30px auto;

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;

overflow: hidden;

}

ul{

list-style-type: none;

line-height: 2em;

padding: 15px;

}

table{

width: 90%;

height: 80px;

margin: auto;

}

textarea{

border: none;

resize: none;

background: lightyellow;

float: left;

}

button{

width: 37px;

height: 60px;

float: right;

}

button:hover{

cursor: pointer;

background: orange;

}

</style>

<body>

<div>

<h2>在線客服</h2>

<div>

<ul>

<li></li>

</ul>

</div>

<table>

<td align="right"><textarea name="text" cols="50" rows="4"></textarea></td>

<td align="left"><button type="button">發(fā)送</button></td>

</table>

</div>

<script>

let btn = document.getElementsByTagName('button')[0];

let text = document.getElementsByName('text')[0];

let ul = document.getElementsByTagName('ul')[0];

// 計數(shù)器

let sum = 0;

</script>

</body>

</html>

總結(jié):

1.先把局拉好,樣式寫好再開始寫代碼(樣式就直接班老師的代碼好了)

2.如果想操作頁面上的元素,就要先獲取到頁面上的元素。我是直接按照老師的寫法用標簽獲取元素

獲取方法有:

getElementById、getElementsByClassName、getElementsByName、getElementsByTagName


Correcting teacher:查無此人Correction time:2019-03-18 09:33:53
Teacher's summary:完成的還不錯。 樣式拿老師的都沒事,主要你自己能寫出來。 工作中,一般都是新頁面,所以要是做前端,還需要把前端聯(lián)系熟。

Release Notes

Popular Entries