一、Try{}catch(e){}
try{
$.each($("div"),function(i,item){
if(...){
throw("异常信息");
}
})
}catch(e){
alert(e);
}
try{
$.each($("div"),function(i,item){
if(...){
throw("异常信息");
}
})
}catch(e){
alert(e);
}
转载于:https://www.cnblogs.com/fger/p/10875463.html