表格的一整行与一整列在鼠标经过时变色 qwbm.com
aaaaaaa
#senfe {width: 300px;height: 300px;border-top: 1px solid #000;border-left: 1px solid #000;}
#senfe td {border-right: 1px solid #000;border-bottom: 1px solid #000;}
window.onload = function(){
var td = document.getElementById("qwbmsenfe").getElementsByTagName("td");
for(var i=0; i
td[i].onmouseover = function(){
for(var j=0; j
if(td[j].cellIndex==this.cellIndex || td[j].parentElement.rowIndex==this.parentElement.rowIndex){
td[j].style.backgroundColor="#000";
}
}
}
td[i].onmouseout = function(){
for(var j=0; j
if(td[j].cellIndex==this.cellIndex || td[j].parentElement.rowIndex==this.parentElement.rowIndex){
td[j].style.backgroundColor="";
}
}
}
}
}