第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

color();里面這三個(gè)是代表什么意思

?window.onload = function(){

? ? ? ? ? color();

? ? ? } ? ? ??

? ? ?// 鼠標(biāo)移動(dòng)改變背景,可以通過(guò)給每行綁定鼠標(biāo)移上事件和鼠標(biāo)移除事件來(lái)改變所在行背景色。

? ? ?function color(){

? ? ? ? ?var list =document.getElementsByTagName("tr");

for(i=1;i<list.length;i++){

? ? list[i].onmouseover=function(){this.style.backgroundColor="red"};

? ? ? ? ?list[i].onmouseout=function(){this.style.backgroundColor="#fff"};

}?

? ? ?}

? ? ? ? ?

? ? ? // 編寫(xiě)一個(gè)函數(shù),供添加按鈕調(diào)用,動(dòng)態(tài)在表格的最后一行添加子節(jié)點(diǎn);

? ?

? ? ? ? ? ?function append(){

? ? ? ? ?var id=document.getElementById("table").lastChild;?

? ? ?

? ? ? ? ?var newnode=document.createElement("tr");

? ? ? ? ?id.appendChild(newnode);

? ? ? ? ? ?

? ? ? ? ?var newnode1=document.createElement("td");

? ? ? ? ? newnode1.innerHTML="xh003";

? ? ? ? ? newnode.appendChild(newnode1);

? ? ? ? ??

? ? ? ? ? var newnode2=document.createElement("td");

? ? ? ? ? newnode2.innerHTML="韋小寶";?

? ? ? ? ? newnode.appendChild(newnode2);

? ? ? ? ??

? ? ? ? ? var newnode3=document.createElement("td");

? ? ? ? ? newnode3.innerHTML= "<a href='javascript:' onclick='lete(this)'>刪除</a>";

? ? ? ? ? newnode.appendChild(newnode3);

? ? ? ? ? ?color();

? ? ? ? ?}

? ? ? ? ? ? ? ?


正在回答

1 回答

?var list =document.getElementsByTagName("tr"); ?//獲取所有<tr>放入數(shù)組list

for(i=1;i<list.length;i++){ ? //循環(huán)

? ? list[i].onmouseover=function(){this.style.backgroundColor="red"};//設(shè)置第i行鼠標(biāo)移入事件

? ? ? ? ?list[i].onmouseout=function(){this.style.backgroundColor="#fff"};//設(shè)置第i行鼠標(biāo)移出事件


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

new新的開(kāi)始 提問(wèn)者

除了這兩個(gè)。是我沒(méi)問(wèn)清楚。。 是這個(gè)。color();帶括號(hào)的
2016-10-17 回復(fù) 有任何疑惑可以回復(fù)我~
#2

new新的開(kāi)始 提問(wèn)者

除了這兩個(gè)。是我沒(méi)問(wèn)清楚。。 是這個(gè)。color();帶括號(hào)的
2016-10-17 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

color();里面這三個(gè)是代表什么意思

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)