onmouseover="this.style.backgroundColor='red'"

解决方案 »

  1.   

    <table><tr  ><td  onmouseover=this.bgColor='#F0F8FF'  > eeeeee</td></tr></table>
      

  2.   

    <td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='red'>abcde</td>
      

  3.   

    <table><tr><td backcolor="'#E7ECFA'" onMouseOver="style.backgroundColor= '#BFCDF2'" onMouseOut="style.backgroundColor= '#E7ECFA'">
    不仅仅是鼠标移动到单元格上面变色,而且当鼠标移出时恢复原来的颜色
    <td><tr><table>简单吧:)
    Good luck
      

  4.   

    建两个函数
    change(color){
    this.style.backgroundColor=color
    }
    unchange(){
    this.style.backgroundColor=""
    }
    在TD标签中加入以下语句:<td onmouseover=change("#000000") onmouseout=unchange>
    //#000000可换成你要的颜色日十六进制值