摘要: window.onload=function(){ try{ if(test&&typeof(test)=="function"){ test(); }else{ alert("不存在的函数"); } }catch(e){ }}function test(){ alert("函数执行……"); }如果不存在,会抛出异常,所以要加try……catch。本文转自 http://www.cnblogs.com/iceblove/archive/2013/01/02/2842204.html 阅读全文
posted @ 2013-01-02 16:17 司南Thinan 阅读(2702) 评论(8) 推荐(0) 编辑