最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

求教關(guān)于appenChild的問題?。?!

求教關(guān)于appenChild的問題?。?!

<!DOCTYPE?html> <html> <head> <meta?charset="UTF-8"> <title>Document</title> <style?type="text/css"> table?{margin:20px;} table?th,table?tr?td{border:1px?solid?black;padding:20px;} </style> <script?type="text/javascript"> window.onload=function(){ var?adBtn=document.getElementById('btn1'); var?oTab=document.getElementById('tab1'); var?oTbody=document.getElementsByTagName('tbody')[0]; var?oTh=document.getElementsByTagName('th'); var?oTd=document.getElementsByTagName('td'); var?oTr=oTbody.getElementsByTagName('tr'); for(var?i=0;i<oTr.length;i++){ var?oldColor=""; oTr[i].onmouseover=function(){ oldColor=this.style.background; this.style.background="blue"; } oTr[i].onmouseout=function(){ this.style.background=oldColor; } if(i%2==0){ oTr[i].style.background="red"; } } adBtn.onclick=function?(){ var?cTr=document.createElement('tr'); var?cTd=document.createElement('td'); cTr.appendChild(cTd); oTab.oTbody.appendChild(cTr);?????//請(qǐng)問我這里哪里寫錯(cuò)了。。 } } </script> </head> <body> 姓名<input?type="text"?name=""> 年齡<input?type="text"?name=""> <input?type="button"?value="添加"?id="btn1"> <table?id="tab1"> <thead> <tr> <th>編號(hào)</th> <th>姓名</th> <th>身高</th> <th>編輯</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>張三</td> <td>170</td> <td></td> </tr> <tr> <td>2</td> <td>李四</td> <td>171</td> <td></td> </tr> <tr> <td>3</td> <td>王五</td> <td>172</td> <td></td> </tr> </tbody> </table> </body> </html>為啥我點(diǎn)添加沒有反應(yīng)。。。 希望前輩們幫幫我??!1
查看完整描述

1 回答

?
超級(jí)巨浪大切

TA貢獻(xiàn)2條經(jīng)驗(yàn) 獲得超0個(gè)贊

已解決 謝謝!

查看完整回答
反對(duì) 回復(fù) 2017-12-08
  • 1 回答
  • 0 關(guān)注
  • 1196 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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