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'; } } }
Reproduced in: https: //www.cnblogs.com/positive/p/3678825.html