JavaScript DHTML/Node Operation/hasChildNodes

Материал из Web эксперт
Перейти к: навигация, поиск

"hasChildNodes()" Example

   <source lang="html4strict">
   

<html> <body> <script language="JavaScript"> function function1() {

   alert(document.getElementById("myText").hasChildNodes());

} </script>

This sample text has child nodes.

<button onclick="function1();">HasChildNodes</button> </body> </html>


     </source>