就是一个表格<tr>里的鼠标移上去变色的功能,我在IE使用的代码如下:
<tr bgcolor="#FFFFFF" onmouseover="this.style.background='#D9F2FF';" onmouseout="this.style.background='#FFFFFF'; this.style.borderColor='#FFFFFF'">显示出来没有问题,但是火狐就不支持,请问怎样解决,谢谢!

解决方案 »

  1.   

    我的测试很正常,不知道是不是你Firefox的版本有问题
      

  2.   

    我是使用js写成一个通用方法去控制的,ie和ff都可以,希望对你有用。
    function highlightRow(tableid) {
    if(document.getElementById(tableid)!=null)
    {
    var t = document.getElementById(tableid).getElementsByTagName("tr");
    for(var i=0;i<t.length;i++)
    {
    t[i].onmouseover = function() {this.style.background = "#c0d2ec";};
    t[i].onmouseout = function() {this.style.background = "white";};
    }
    }
     };