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

查看:136
本文介绍了禁止“完成,但页面上有错误”在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.

留意你工具给你的警告,我在街上听说编写它们的人都是非常聪明的饼干。 :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天全站免登陆