网页屏蔽js错误信息方法 解决ie状态栏显示黄叹号问题

把下面代码放到js代码的最前面才能捕获整个html的js错误:

 Js代码 
<script language=”javascript”>  
    window.onerror = function(){  
        return true;  
    }  
</script> 

直接添加在页面顶部,即可屏蔽js各种错误信息

关于笃志情缘

人尽其责,物尽其用,不成功,也无憾,毕竟奋斗过。走自己的路吧! 笃志建站:虚拟主机、域名注册、云主机、成品网站、企业邮局、CDN加速 http://www.duzhi.net QQ:3081689173
此条目发表在网站技术分类目录,贴了标签。将固定链接加入收藏夹。

网页屏蔽js错误信息方法 解决ie状态栏显示黄叹号问题》有19条回应

  1. Atharv说:

    Ab fab my golody man.

  2. Giulio说:

    Now we know who the selsbine one is here. Great post!

  3. Luibov说:

    I might be beating a dead horse, but thank you for ptsoing this!

  4. Zak说:

    Damn, I wish I could think of soemthnig smart like that!

  5. Amit说:

    Geez, that’s ubnlieevalbe. Kudos and such.

  6. Jackie说:

    That’s a knowing answer to a difficult qseution

  7. Jeffrey说:

    That’s a smart answer to a tricky qsuetion

  8. Nasar说:

    Thanks for spending time on the computer (wirtnig) so others don’t have to.

  9. Kayra说:

    You saved me a lot of haslse just now.

  10. Bryan说:

    I’m impressed you sohlud think of something like that

  11. Real说:

    Insgihts like this liven things up around here.

  12. Hayle说:

    One or two to reemmebr, that is.

  13. Roberto说:

    Thnkinig like that is really amazing

  14. Lucia说:

    A simple and inetlligent point, well made. Thanks!

  15. Victor说:

    Ab fab my godoly man.

  16. Bhudy说:

    Wow, your post makes mine look feelbe. More power to you!

  17. Junjaram说:

    Your story was really infromtaive, thanks!

  18. Sandy说:

    You get a lot of respect from me for writing these helpful airctles.

  19. Jenny说:

    Walking in the presence of gintas here. Cool thinking all around!

评论已关闭。