Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.links properties

Status
Not open for further replies.

charlie12345

Technical User
Mar 4, 2001
28
US
document.links is an array of all the links in the document.
document.links(n) returns the value of the URL for that link in the array.
document.links(n).text returns 'undefined'.
document.links(n).href returns the URL.

How do I get the value of the actual text displayed for the link?

 
try the innerText property - can be used for any tag too. There is also innerHTML.

document.links(n).innerText

Bj.
b2 - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top