检验是否出错,作用相当于编译
<script type="text/javascript">
onerror=handleErr;
var txt="";
function handleErr(msg,url,l){
txt+="错误信息:"+msg+"\n";
txt+="行:"+l+"\n";
alert(txt);
return true;
}
</script>
JavaScript简易错误排查处理
猜你喜欢
转载自blog.csdn.net/qq_37822034/article/details/83870157
今日推荐
周排行