禁止“完成,但页面上有错误".在IE中 [英] Suppress "Done, but with errors on page" in IE

查看:53
本文介绍了禁止“完成,但页面上有错误".在IE中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用许多jQuery和JavaScript的网站,该网站在IE的页脚中生成完成但页面有错误"消息.该网站上的所有内容均正常运行,因此我不想花时间对确切的错误进行故障排除.我想做的就是取消显示完成,但页面上有错误"消息,以使客户端不会感到恐惧.

I have a website using lots of jQuery and JavaScript that produces a "Done, but with errors on page" message in the footer of IE. Everything on the site works perfectly, so I don't want to spend the time troubleshooting the exact error. All I would like to do is suppress the "Done, but with errors on page" message so that clients don't freak out.

我在页面顶部尝试了以下操作,但没有成功:

I tried the following at the top of the page with no success:

window.onerror = function() {return true;}

推荐答案

您不能阻止浏览器告诉用户页面上有错误.那将是一个安全漏洞,您实际上无权这样做.您别无选择,只能尝试修复它或让用户看到此消息.

You can't stop the browser from telling users that there's errors on the page. That would be a security hole, and you don't really have the right to. You have no choice but to try to fix it or have users see the message.

这是否意味着您应该尝试解决该错误?好吧,看到您无法抑制它,并且您认为用户不会喜欢此消息是正确的,并且有大量优秀的调试工具可供使用,实际上没有理由不这样做.

Does this mean you should try and fix the error? Well, seeing as you can't suppress it, and you are correct in thinking that users won't enjoy the message, and that there are tons of excellent debugging tools available, there's really no reason not to.

请注意您的工具给您的警告,我在大街上听说,编写这些工具的人是非常聪明的cookie.:D

Heed the warnings your tools give you, I've heard on the streets that the people who wrote them were pretty smart cookies. :D

这篇关于禁止“完成,但页面上有错误".在IE中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆