String.anchor() (Method)

Encapsulates the string within an <A NAME="..."> tag context.


JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Netscape Enterprise server - 2.0
Opera - 3.0
Property/method value type:String primitive
JavaScript syntax:-myString.anchor()
Argument list:aNameThe value of the NAME attribute in the result string

Passing in the string "An Anchor" with the parameter "Anchor1" will result in the following string:

<A NAME="Anchor1">An Anchor</A>

This is useful for creating named anchors within the document.

See also:Anchor object,,, Url object