调试JavaScript错误
2010-08-08 20:14:23 来源:WEB开发网核心提示:<script type="text/javascript"> view sourcePRint?1 function myerror(_message,_url,_line) { view sourceprint?1 alert("错误信息:" + _message
<script type="text/javascript">
view sourcePRint?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?
view sourcePRint?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?
Tags:调试 JavaScript 错误
编辑录入:爽爽 [复制链接] [打 印][]
赞助商链接