Return the number of anchors in a document : Anchor : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Anchor »

 

Return the number of anchors in a document



<html>
<body>

    <a name="A">First anchor</a><br>
    <a name="B">Second anchor</a><br>
    <a name="C">Third anchor</a><br>
    <br>

    Number of anchors in this document:
    <script type="text/javascript">
        document.write(document.anchors.length)
    </script>

</body>
</html>



           
       



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Anchor