gpt4 book ai didi

javascript - onclick 在 Internet Explorer 7 中不起作用

转载 作者:太空宇宙 更新时间:2023-11-04 16:27:32 25 4
gpt4 key购买 nike

我在网页上有以下代码:

<DIV style="TEXT-ALIGN: center">
<A style="CURSOR: auto" onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='auto'" onclick="alert('0: 272ec6651cb6d320579205b7a250a14920708a41');">[Back To List]</A>
<A onmouseover="this.style.cursor='pointer'" onmouseout="this.style.cursor='auto'" onclick="alert('1: 20');">[View Comments]</A>
</DIV>

第一个链接有效,第二个无效。通过工作,我的意思是指针在鼠标悬停时发生变化,单击它会触发警报消息。第二个链接,鼠标没有变化,点击也没有反应。我在这里做错了什么?我该如何进行这项工作?

另请注意,这在 firefox、google chrome 和 internet explorer 8 中运行良好 - 只有 internet explorer 7 及以下版本有问题,但我确实需要支持它们。

编辑:澄清一下,没有关于第二个链接的工作 - 它不仅仅是 javascript,鼠标悬停也没有像它为第一的。第一个链接显然有问题导致无法正确处理第二个链接,但我看不出是什么原因。

最佳答案

尝试使用 IE 中的开发人员工具来查找您的第二个链接在 IE7 中的位置。可能它不在您认为应该在的位置。

关于javascript - onclick 在 Internet Explorer 7 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5244465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com