August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.anchors[num].text
The text property contains the text that appears between the <a> and </a> tags. If other HTML tags appear within these two anchor tags, the text property might not contain all of the text between the anchor tags.
Listing 7.3 creates a dictionary of fruit where the heading for each letter of the dictionary is designated as an anchor. At the bottom of the document, the text property of the anchors is used to create hyperlink text that points to each anchor.
<html> <center> <h1><u>Fruit Dictionary</u></h1> Pick a letter: <a href="#A">A</a>|<a href="#B">B</a>|<a href="#C">C</a> </center> <hr><a ... |
Read now
Unlock full access