Notes icon indicating copy to clipboard operation
Notes copied to clipboard

判断DOM元素是否有子元素的3种方法

Open any86 opened this issue 3 years ago • 0 comments

node.firstChild !== null
node.childNodes.length > 0
node.hasChildNodes()

any86 avatar Mar 05 '21 06:03 any86