'getElementsByTagName()' Example : getElementsByTagName : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » getElementsByTagName »

 

'getElementsByTagName()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    var m = document.getElementsByTagName("P");
    alert(m.length)

</script>
<input type="button" 
       value="Get the number of p elements in this page" 
       onClick="function1();">
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» getElementsByTagName