首页 > 技术文章 > 二、jquery Try{}catch(e){}

fger 2019-05-16 14:29 原文

一、Try{}catch(e){}

try{
  $.each($("div"),function(i,item){
    if(...){
    throw("异常信息");
    }	
  })
  
}catch(e){
  alert(e);
}

  

推荐阅读