Name

Node.hasChildNodes( ): determine whether a node has children — DOM Level 1 Core

Synopsis

boolean hasChildNodes( );

Returns

true if this node has one or more children; false if it has none.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.