HTML DOM anchors Collection
Complete Document Object Reference
Definition and Usage
The anchors collection returns a reference to all Anchor objects containing a
name attribute in the document.
Syntax
Example
<html>
<body>
<a name="first">First anchor</a><br />
<a name="second">Second anchor</a><br />
<a name="third">Third anchor</a><br />
<br />
Number of anchors in this document:
<script type="text/javascript">
document.write(document.anchors.length)
</script>
</body>
</html>
|
Try-It-Yourself Demos
Return the number of anchors in a document
Return the innerHTML of the first anchor in a document
Complete Document Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|