2009年11月25日
摘要: 当某段JS在某些特殊情况下可能出错,而又不想其错误信息显示出来,我们可以通过重载window.onerror事件来达到目的!只要其返回true,脚本错误就不会再显示!Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1<scripttype="text/javascript">2functionfnOnError(msg){//自定义JS错误消息3alert(msg);4returntrue;5}6window. 阅读全文
posted @ 2009-11-25 17:34 牦牛 阅读(303) 评论(0) 推荐(0) 编辑