Firefox下onClick失效.

来源:百度知道 编辑:UC知道 时间:2024/06/08 06:08:47
<a href="#" onClick="list_box.style.backgroundColor='#FAFBE6';return false;"><img src="images/color1.gif" width="10" height="10" border="0"></a>

这段代码在Firefox下失效了.在IE,傲游和Opera下正常呢.悬赏100分争求解决方法.谢谢了.

<a href="javascript:document.getElementById('list_box').style.backgroundColor='#FAFBE6'"><img src="images/color1.gif" width="10" height="10" border="0"></a>

<这里放你的list_box id="list_box">,比如<input type="button" id="list_box" value="button">

  您好,感谢您对火狐的支持

修改后如下:

<a href="javascript:document.getElementById('list_box').style.backgroundColor='#FAFBE6'"><img src="images/color1.gif" width="10" height="10" border="0"></a>
  您可以在火狐官方网站下载火狐浏览器,在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。