【DOM编程艺术】滑过高亮显示 highLightRows

function highLightRows(){
     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';
        }
        
    }
}

 

posted @ 2014-04-21 17:21  Western Journey  阅读(189)  评论(0编辑  收藏  举报