在这个带有验证码演示的页面上:
http://www.tutorialcadet.com/demo/ajaxform/
在internet explorer中,验证码图像不刷新(当单击图像时)。在firefox中。chrome,opera,它工作得很好。
它在资源管理器中抛出了这个弹出式错误:
Line: 155
Error: Object doesn't support this property or method然后,当我在explorer中检查源代码时,我在第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的某种bug吗?
发布于 2011-07-21 01:49:59
JS文件都没有定义方法refreshimg(),因此出现了错误。
此外,captcha.js已经有了处理验证码的代码。
从# refreshimage();锚点的onclick中删除该刷新部件。
锚点元素现在应该如下所示:
<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>发布于 2011-07-21 01:49:53
去掉onclick="refreshimg()"吧。该函数没有在任何地方定义,您实际上也不需要它,因为单击事件已经在http://www.tutorialcadet.com/demo/ajaxform/js/captcha.js中处理了
https://stackoverflow.com/questions/6766146
复制相似问题