判断父元素下是否有子元素

jq: $(parent).children().length==0get

js:  parentNode.getElementsByTagName("*").length == 0

相关文章
相关标签/搜索