求助:鼠标放在单元格里的文字链接上时如何改变单元格背景图,离开时又恢复原来背景图 selfObj.parentElement.background=url(images/over.gif)selfObj.parentElement.background=url(images/out.gif) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script type="text/javascript">function MdyOverBG(selfObj){ selfObj.style.background="url(images/over.gif)";}function MdyOutBG(selfObj){ selfObj.style.background="url(images/out.gif)";}</script><table border="0" width="22%" id="table1" height="27" cellspacing="0" cellpadding="0"> <tr> <td style="background-image: url('images/out.gif')" align="center" onmouseover="MdyOverBG(this)" onmouseout="MdyOutBG(this)"><a>最近更新</a></td> <td style="background-image: url('images/out.gif')" align="center" onmouseover="MdyOverBG(this)" onmouseout="MdyOutBG(this)"><a>今日推荐</a></td> </tr></table> 这儿错在什么地方了:<style> .pic1{background:url(images/mf_l.gif)} .pic2{background:url(images/mf_lv.gif)} </style> <table border="0" width="22%" id="table1" height="37" cellspacing="0" cellpadding="0"> <tr> <td id="aa" onmouseover="this.style.background='mf_lv.gif';bb.style.background='mf_l.gif'" class="pic1"><a href="">最近更新</a></td> <td id="bb" onmouseover="this.style.background='mf_lv.gif';aa.style.background='mf_l.gif'" class="pic1"><a href="">今日推荐</a></td> </tr></table> 我需要这个效果,可是运行时发生错误: <td id="aa" onmouseover="this.style.background='mf_lv.gif';bb.style.background='mf_l.gif'" class="pic1"><a href="">最近更新</a></td> <td id="bb" onmouseover="this.style.background='mf_lv.gif';aa.style.background='mf_l.gif'" class="pic1"><a href="">今日推荐</a></td>我该修改哪儿? 一、this.style.background='mf_lv.gif'改成this.style.background='url(mf_lv.gif)'二、没有onmouseout事件 还有 bb.style.background='mf_l.gif' --> bb.style.background='url(mf_l.gif)' jquery 限制只能输入 数字的 代码需要大神 修改一个部分 求教学习方法 javascript数值四则运算精度修正函数 ios 的 chrome 是不是不能访问 window.opener ? JAVASCTIP如何起步啊 这个正则表达式该怎么写? 各位请帮助我,一个类似与 java中的process.exec()的调用! 关于字符串的问题,急,在线等待!! 怎么通过a链接传递父id js constructor的问题 谁能解密这段js代码啊!拜托了 arguments的问题?
<script type="text/javascript">
function MdyOverBG(selfObj){
selfObj.style.background="url(images/over.gif)";
}
function MdyOutBG(selfObj){
selfObj.style.background="url(images/out.gif)";
}
</script>
<table border="0" width="22%" id="table1" height="27" cellspacing="0" cellpadding="0">
<tr>
<td style="background-image: url('images/out.gif')" align="center" onmouseover="MdyOverBG(this)" onmouseout="MdyOutBG(this)"><a>最近更新</a></td>
<td style="background-image: url('images/out.gif')" align="center" onmouseover="MdyOverBG(this)" onmouseout="MdyOutBG(this)"><a>今日推荐</a></td>
</tr>
</table>
.pic1{background:url(images/mf_l.gif)}
.pic2{background:url(images/mf_lv.gif)}
</style>
<table border="0" width="22%" id="table1" height="37" cellspacing="0" cellpadding="0">
<tr>
<td id="aa" onmouseover="this.style.background='mf_lv.gif';bb.style.background='mf_l.gif'" class="pic1"><a href="">最近更新</a></td>
<td id="bb" onmouseover="this.style.background='mf_lv.gif';aa.style.background='mf_l.gif'" class="pic1"><a href="">今日推荐</a></td>
</tr>
</table>
<td id="bb" onmouseover="this.style.background='mf_lv.gif';aa.style.background='mf_l.gif'" class="pic1"><a href="">今日推荐</a></td>我该修改哪儿?
this.style.background='mf_lv.gif'
改成
this.style.background='url(mf_lv.gif)'二、
没有onmouseout事件