<scr
ipt type="text/
javascript">
view source
PRint?1 function myerror(_message,_url,_line) {
view sourceprint?1 alert("错误信息:" + _message +"\n错误的URI:" + _url +"\n错误的行数:" + _line );
show sourceview sourceprint?1 return true; //屏蔽系统的事件
show sourceview sourceprint?1 }
show sourceview sourceprint?1 //绑定错误事件
show sourceview sourceprint?1 window.onerror = myerror;
show sourceview sourceprint?1 //触发错误示例:
show sourceview sourceprint?1 window,onload = test;
show sourceview sourceprint?