Check node descendant : isDescendant « Dojo toolkit « JavaScript DHTML






Check node descendant

 
<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/"
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      function testIt() {
        alert(dojo.isDescendant(dojo.byId("div3"), dojo.byId("div1")));
      }
    </script>

  </head>

  <body onLoad="testIt();">
    <span id="div1"></span>
    <span id="div2"><span id="div3"></span></span>
  </body>

</html>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Check descendant by id