JavaScript判断对象有没有定义

if ( typeof(callbackfun) != "undefined" ) {
callbackfun();
}

posted on 2019-03-22 17:19  Mrnx  阅读(425)  评论(0)    收藏  举报