js判斷方法是否存在

if(typeof yourfunctionname === 'function' ){     //存在且是function }else{     //不存在或不是function }
相關文章
相關標籤/搜索