Microsoft® JScript
anchor Method

See Also

Language Reference 

Description

Places an HTML anchor tag with a NAME attribute around specified text in the object.

Syntax

strVariable.anchor(anchorstring)
"String Literal".anchor(anchorstring)

The anchorstringargument is text you want to be placed in the NAME attribute of an HTML anchor.

Remarks

Call the anchor method to create a named anchor out of a string object. The following example demonstrates how the anchor method accomplishes this:


var strVariable = "This is an anchor"
strVariable.anchor("Anchor1")
The value of strVariable after the last statement above is: <a name="Anchor1">This is an anchor</a>.

No checking is done to see if the tag already exists.


© 1996 by Microsoft Corporation.

Casa de Bender