This is a sample.




<html>
<head>
 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
  <title>A test.</title>
  <script type="text/javascript">
  function Go()
  {
   if(document.implementation.hasFeature("XPath","3.0"))
   {
    var result = document.evaluate("descendant::div",document,null,0,null);
    alert(result.iterateNext());
   }
   else
   {
     alert("Not Support");
   }
  }

  </script>
</head>
<body>
<input type="button" value="Test" onclick="Go()">
<div>This is a sample.</div>
</body>
</html>