9-22練習(xí)題Highlight()函數(shù)這樣寫語法有沒有錯(cuò)誤??
function Highlight()
{
? ? ? var tbody = document.getElementById('table').lastChild;
trs = tbody.getElementsByTagName('tr'); ??
for(var i =1;i<trs.length;i++){
trs[i].onmouseover=onmous(trs[i]);
? ? ? ? ? ? ? ? ? ? ? ?trs[i].onmouseout =outmous(this);
? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ?function onmous(trsi)
? ? ? ? ? ? ? ? ?{
trsi.style.backgroundColor ="#f2f2f2";
}?
? function outmous(trsi)
? {
trsi.style.backgroundColor ="#fff";
? ? ??
? }
}
2017-06-03
有沒有錯(cuò)寫完測試一下就知道拉