Javascript 判断是否存在函数 window.onload=function(){ try{ if(test&&typeof(test)=="function"){ test(); }else{ ...