An object that resides below the document in the scripting object model. This object specifies an array of anchors for a given document. Each entry in this array corresponds to an anchor <A> tag that is found in the corresponding document.
![]()
The anchor object is referenced as a read-only property array. An anchor object is constructed for every anchor tag <A> found in the HTML document. It is only accessible through the indexed array. The following lines of script would set anchortext to the name of the third anchor on the page (if it exists).
<script language="VBScript"> [some preceding VBScript code] anchortext = document.anchors(2).name [some following VBScript code] </script>
Gets or sets the name of the anchor.
anchor.name [=string]
Part Description anchor An object expression that evaluates to an anchor object. string A string containing the new anchor name.
Returns a string containing the complete name of the anchor.