js判断方法是否存在

if(typeof yourfunctionname === 'function' ){     //存在且是function }else{     //不存在或不是function }
相关文章
相关标签/搜索