jquery判断元素是否存在
摘要:用于判断页面元素是否存在: if ( $(" ID").length 0 ) { $(" ID").text("hi"); }
阅读全文
posted @
2019-05-22 14:57
Mrnx
阅读(25339)
推荐(1)
JavaScript判断对象有没有定义
摘要:if ( typeof(callbackfun) != "undefined" ) { callbackfun(); }
阅读全文
posted @
2019-03-22 17:19
Mrnx
阅读(426)
推荐(0)