Anchor.text (Property)

The text between the <A> and </A> HTML tags in Netscape.


JavaScript - 1.2
Netscape - 4.0
Property/method value type:String primitive
JavaScript syntax:NmyAnchor.text
NmyAnchor.text = aString
HTML syntax:<A>someText</A>
Argument list:aStringSome new text content for the anchor

This is equivalent to the innerText value that MSIE supports. It only works on Netscape and is somewhat less reliable than the innerText property in MSIE.

Assigning to this property in MSIE simply creates a text property, but does not affect the text of the anchor.

The value yielded by this property (when it does work) is the text between the <A> and </A> tags.


See also:Anchor object, Element.innerText, Url.text

Property attributes: