本文实例讲述了JS实现的表格行鼠标点击高亮效果代码。分享给大家供大家参考,具体如下:
偶尔在看天天基金网净值公告时,从源代码里剥下的一段js代码,感觉比较实用,分享一下(仅IE有效)
SEOver(){
var source=event.srcElement;
if (source.tagName=="TD"){
source=source.parentElement;
var cells = source.children;
if (cells[0].style.backgroundColor!=highlightcolor&&cells[0].style.backgroundColor!=clickcolor)
for(i=0;iSEOut(){
var source=event.srcElement;
if (source.tagName=="TD"){
source=source.parentElement;
var cells = source.children;
if (cells[0].style.backgroundColor!=clickcolor)
for(i=0;i
SEOver="MouSEOver()" onclick="MouseClick()" onmouSEOut="MouSEOut()" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#cccccc" border="1" width="80%" align="center" style="cursor:pointer">