在鼠标悬停在某个表格行的上方时改变该行文本效果
2017-10-11 本文已影响0人
HeroMeikong
function highlightRows() {
if(!document.getElementsByTagName) return false;
var rows = document.getElementsByTagName("tr");
for(var i=0;i<rows.length;i++){
rows[i].onmouseover = function () {
this.style.fontWeight = "bold";
}
rows[i].onmouseout = function () {
this.style.fontWeight = "normal";
}
}
}