《XMLDOM对象方法手册》

中国标准XML》XML系列电子书     | |

  haschildnodes 方法
 
 

 作   用

 如果指定的节点有一个或更多子节点,传回值为true。  

 基本语法

 boolValue = xmlDocumentNode.hasChildNodes() ;

 

说   明

 如果此节点有子节点传回值为true,否则传回false 值。

 

范   例

boolValue = xmlDoc.documentElement.hasChildNodes();
alert(boolValue);