经典的页面调试信息输出方法

经典的页面调试信息输出方法

<script language="javascript">
function reportError(msg,url,line) {
 var str = "You have found an error as below: \n\n";
 str += "Err: " + msg + " on line: " + line;
 alert(str);
 return true;
}
window.onerror = reportError;
</script>
<script>
 alert(‘)
</script>

发表评论