function over() {
  this.backgroundColor = '#00AAFF';
}function out() {
  this.backgroundColor = '';
}

解决方案 »

  1.   


     <table> 
          <tr> 
            <td  onmouseover="over(this)"  onmouseout="out(this)" >111 </td> 
            </tr> 
            </table> 
            <script  language="javascript" > 
    function over(oTd){
    oTd.style.backgroundColor = "#00AAFF";
    }
    function out(oTd){
    oTd.style.backgroundColor = "#FFFFFF";
    }
                  </script>      
      

  2.   

        protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow )
            {
                e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#C0C0FF';this.style.cursor='hand';");
                //当鼠标移走时还原该行的背景色
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
            }
        }给你这个参考一下,Attributes里就是js
      

  3.   

    <table> 
          <tr> 
            <td onmouseover="this.style.backgroundColor ='#00AAFF'"  
                    onmouseout="style.backgroundColor = '#FFFFFF'">当鼠标经过一个表格时,改变表格的背景颜色为#00AAFF,请补全代码,鼠标移开时,还原表格背景颜色(#FFFFFF)</td> 
         </tr> 
    </table> 
      

  4.   

    借贵地一用:
    请问各位,用javascript写得网页里,我查看源代码,为什么看不到数据啊?应该是数据的地方是一些如:=BB的一些符号和字符组合。为什么啊?看不懂!!谢谢各位!