JavaScript DHTML/Javascript Collections/childNodes

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

"childNodes" Example

   <source lang="html4strict">
   

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

   var m = document.all.myBody.childNodes;
   alert(m.length) 

} </script> </head> <body id="myBody">


www.wbex.ru

<input id="myB"

      type="button" 
      value="How many child nodes have this body element?" 
      onclick="function1()">

</body> </html>


     </source>