August 1999
Intermediate to advanced
1488 pages
72h 53m
English
link.text
The text property of the Link object is used to get the text value of the link.
Listing 7.378 shows how to use the text property. When the button is clicked, the showtext function displays the text value of the link.
<html> <head> <title> Using the text property of the Link object</title> </head> <body> <script language="JavaScript"> <!-- Hide // function to display the value of the text property function showtext(){ document.form1.text1.value = document.links[0].text; } // End Hide ---> </script> Click the button to see the text value of the link. <form name="form1"> <a href=http://www.mcp.com:80/foo?something#foobar> Link ... |
Read now
Unlock full access