属标经过,换背景颜色

 tr:hover, tr.altrow{
 background-color:#c4e4ff;} /* 动态变色 */

<script language="javascript">
var rows=document.getElementsByTagName('tr');
for(var i=0;i<rows.length;i++)
{
    rows[i].onmouseover=function(){this.className+='altrow';}
    rows[i].onmouseout=function()
    {
        this.className=this.className.replace('altrow','');
    }
}

</script>

posted on 2008-11-08 21:03  Paul_  阅读(288)  评论(0编辑  收藏  举报

导航