hasChildNodes method

This topic has not yet been rated - Rate this topic

Returns a value that indicates whether the object has children.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4

Syntax

object.hasChildNodes()

Parameters

This method has no parameters.

Return value

Type: Boolean

Returns one of the following possible values:
Return valueDescription
true

The object contains HTML Elements or TextNode objects.

false

The object does not contain HTML Elements or TextNodes.

 

Standards information

Remarks

If the object contains HTML Elements or TextNodes, they can be accessed from the childNodes collection.

See also

a
abbr
address
area
attribute
b
base
bdo
blockQuote
body
br
button
caption
cite
code
col
colGroup
comment
dd
del
div
dl
dt
em
embed
fieldSet
form
head
hn
hr
html
i
iframe
img
input type=button
input type=checkbox
input type=file
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
ins
kbd
label
legend
li
link
map
ol
option
p
pre
q
s
samp
script
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
title
tr
u
ul
var
About the W3C Document Object Model

 

 

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.