标签:
window.onerror = function(msg, file, line){ var errorTxt = ""; errorTxt += "Error: " +msg+ "\n"; errorTxt += "Line: " +file+ "\n"; errorTxt += "Url: " +line+ "\n"; console.log(errorTxt); return false; //true表示是否需要弹出错误提示。false 不需要。 }
标签:
原文地址:http://www.cnblogs.com/mmdrs/p/4275175.html