对不起,函数前面还有:var curr

解决方案 »

  1.   

    我改进过的函数如下:
    var curr
    function change(tabID){
    if(curr!=null){    //为恢复原来的颜色
       document.all(tabID).rows[curr].style.background=document.bgColor;
    }
    document.all(tabID).rows    //高亮显示[window.event.srcElement.parentElement.rowIndex].style.background=document.fgColor;
    curr=window.event.srcElement.parentElement.rowIndex;
    }但还是有document.all(tabID).rows[window.event.srcElement.parentElement.rowIndex].style为空或不是对像的错误.为什么啊??