phoenix13

导航

 

http://www.jb51.net/article/18717.htm javascript 异常处理使用总结

http://www.w3school.com.cn/js/js_errors.asp  JavaScript 错误 - Throw、Try 和 Catch

 

try{
  

}
catch(error){ 
with(document){ 
write("出现了异常<br>"); 
write("异常类型:"+error.name+"<br>"); 
write("异常消息:"+error.message); 
} 
}finally{ 
document.write("异常处理完毕!"); 
} ;

 

posted on 2013-07-19 15:28  phoenix13  阅读(172)  评论(0编辑  收藏  举报