例:
   <div id="row" style="width:200px;height:25px" onmouseover='this.style.background-color=red'>
       <div style="float:left;height:25px;width:50px"></div>
       <divstyle="float:left;height:25px;width:50px"></div>
       <divstyle="float:left;height:25px;width:50px"></div>
   </div>想用div制作表格,如果让鼠标移到行上,背景就变色,好象这样不行呢!
哪些有经验之兄曾今做过的!
在此请教!谢谢....
    

解决方案 »

  1.   

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

  2.   

    div+css 就可以实现
    http://hi.baidu.com/wsbpx/blog/item/7722b7ef779a5015fcfa3c0d.html
      

  3.   

    我刚才写错了点,是onmouseover="this.style.backgroundColor='red'
    但是这样是不行的.
      

  4.   

    <tr onmouseover="this.style.backgroundColor='red'" >
      

  5.   

    onmouseover="this.style.backgroundColor='#B9D1F3'" onmouseout="this.style.backgroundColor='#ffffff'"
      

  6.   


    <div id="row" style="width:200px;height:25px"  
    onmouseleave="this.style.backgroundColor='white'" 
    onmouseover="this.style.backgroundColor='red'"> 
          <div style="float:left;height:25px;width:50px"> sdf</div> 
          <div style="float:left;height:25px;width:50px"> sdf</div> 
          <div style="float:left;height:25px;width:50px"> sdf</div> 
      </div> 
      

  7.   

      <div>
        <div onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='#FFFFFF'" >a</div>
        <div onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='#FFFFFF'">b</div>
        <div onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor='#FFFFFF'">c</div>
        </div >
      

  8.   

    <div id="row" style="width:200px;height:25px" onmouseover="this.style.backgroundColor='red';">
          <div style="float:left;height:25px;width:50px"> </div>
          <divstyle="float:left;height:25px;width:50px"> </div>
          <divstyle="float:left;height:25px;width:50px"> </div>
      </div> 
      

  9.   

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

  10.   

     onmouseover="this.style.background-color='red'"