js调试技巧

window.onerror=reportError;
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;
}

原文地址:https://www.cnblogs.com/leamiko/p/2039790.html