Community post
判断对象是否为空 js与Jquery区别
- js
if(document.getElementById('id')==null)
2 Jqurey
if($('#id').length==0)
注意:不可用('#id')总是返回JQuery对象
4th Street Bar
Hive-Bar
Browse freely. Sign in only when you want to participate.
Hive-Bar Powered by Hive beta-fdb5b5b
Community post
if(document.getElementById('id')==null)
2 Jqurey
if($('#id').length==0)
注意:不可用('#id')总是返回JQuery对象
Replies (2)
受教
Congratulations @fkoryp! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP