gpt4 book ai didi

javascript - 如何修复 Internet Explorer 中的“"Error: Object doesn' t support this property or method”javascript 错误?

转载 作者:行者123 更新时间:2023-12-02 20:12:44 25 4
gpt4 key购买 nike

在此带有验证码演示的页面上:

http://www.tutorialcadet.com/demo/ajaxform/

验证码图像在 Internet Explorer 中未刷新(单击图像时)。在火狐浏览器中。 chrome、opera 运行良好。

它会在资源管理器中抛出此弹出错误:

Line: 155
Error: Object doesn't support this property or method

然后,当我在资源管理器中检查源代码时,我在第 155 行看到了这一点:

<td><div id="captchaimage"><a href="SITE_BASE/register/" id="refreshimg" onclick="refreshimg(); return false;" title="Click to refresh image"><img src="captcha/image.php?1311183335" alt="Captcha image" width="132" height="46" align="left" /></a></div></td>

然后,当我再次单击图像时,会出现另一个错误弹出窗口:

Line: 1
Error: Object doesn't support this property or method

当我查看源代码时,我看到一个“空白行”?在第一行。这是我所说的第一行空白的屏幕:

http://i54.tinypic.com/23ves1j.jpg

有什么建议可以解决这个问题吗?这种情况仅发生在 Internet Explorer 中。我目前使用的是 9。这是某种 Internet Explorer 错误吗?

最佳答案

没有任何 JS 文件定义方法 refreshimg(),因此出现错误。

此外,captcha.js 已经具有处理验证码的代码。

从 #refreshimg anchor 的 onclick 中删除 refreshimage(); 部分。

anchor 元素现在应该如下所示:

<a href="SITE_BASE/register/" id="refreshimg" onclick="return false;" title="Click to refresh image">
<img src="captcha/image.php?1311183335" alt="Captcha image" width="132" height="46" align="left" />
</a>

关于javascript - 如何修复 Internet Explorer 中的“"Error: Object doesn' t support this property or method”javascript 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6766146/

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