use style's background-image property, try
<table border=1>
<tr>
<td style="width:160;height:50;" onmouseover="this.style.backgroundImage='url(http://www.csdn.net/images/csdn.gif)';" onmouseout="this.style.backgroundImage='';">csdn</td>
<td style="width:160;height:50;" onmouseover="this.style.backgroundImage='url(http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif)'" onmouseout="this.style.backgroundImage='';">msdn</td>
</tr>
</table>
<table border=1>
<tr>
<td style="width:160;height:50;" onmouseover="this.style.backgroundImage='url(http://www.csdn.net/images/csdn.gif)';" onmouseout="this.style.backgroundImage='';">csdn</td>
<td style="width:160;height:50;" onmouseover="this.style.backgroundImage='url(http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif)'" onmouseout="this.style.backgroundImage='';">msdn</td>
</tr>
</table>
解决方案 »
- Can't Load external XML document? Can't load external css document?
- EXT3.3.1在IE9上 , TreePanel click event 失效
- javascript跨域访问webservice的问题
- WEB页面连结本地access数据库的不同方案选择
- 运算问题求助!
- 不用window.open()和window.showModalDialog(),怎么隐藏工具栏和地址栏?
- 请问在.net中,怎样调用js来验证textbox是否有值,并且是信箱
- 高分求教!在flash中使用javascript。
- Javascript能把它本身用的CSS文件内的一个背景变量放到它的一个变量中吗?急急急????
- 就没有人知道吗,怎么在网页上用Javascript实现本地文件的保存打开
- 遇到个困难,关于列表框(LIST)取值的问题
- 如何在select的onchange()事件中撤销更改?
<table><tr>
<td onmouseover='myimg.src="csdn2.gif"' onmouseout='myimg.src="csdn.gif"'><img src='csdn.gif' id='myimg'></td>
<tr><table>