您的位置:程序门 -> web 开发 -> asp



如何用脚本实现表格行热跟踪?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何用脚本实现表格行热跟踪?
发表于:2007-01-12 10:43:29 楼主
<script>                      
    function       chg(o){      
    o.bgcolor= "#99ccff "      
//       o.style.color= 'blue '      
    }      
    function       out(o,c){      
    o.bgcolor=c    
//   '   o.style.color= ' '      
    }      
  </script>
如: <td   bgcolor= "#cccccc "   onmouseover= "chg(this) "   onmouseout= "out(this, '#cccccc ') "   height= "23 ">
上面这样只能实现单元格热跟踪.请问如何实现整行热跟踪?   (急!在线等待!)
发表于:2007-01-12 10:55:541楼 得分:0
把bgcolor= "#cccccc "   onmouseover= "chg(this) "   onmouseout= "out(this, '#cccccc ') "  

加在tr标签里就可以了

eg:
<tr   onmouseover= "chg(this) "   onmouseout= "out(this, '#cccccc ') "   >
发表于:2007-01-12 10:56:572楼 得分:0
楼上正解
发表于:2007-01-12 12:03:183楼 得分:0
我测试过,如果在 <td   bgcolor=#ccffff> 没有初如的bgcolor=#ccffff这个就行,如果有了初始颜色状态 <td   bgcolor=#ccffff> 就失效.
发表于:2007-01-12 15:55:324楼 得分:0
yes,优先级不一样


快速检索

最新资讯
热门点击