日期:2014-05-20  浏览次数:20420 次

如用利用CSS,使用鼠标经过时更换背景图片
n
{
background-image:url(images/1.gif);
background-repeat:no-repeat;
background-position:center;
}
.m
{
background-image:url(images/2.gif);
background-repeat:no-repeat;
background-position:center;
}

<table height="100px" width="100px">
  <tr class="n" onmousemove="this.classname='m'" onmouseout="this.classname='n'">
  <td >aaaaa</td>
  </tr>
  </table>



这样为何没反应呢

------解决方案--------------------
onmousemove换成onmouseover
this.classname换成this.className