Microsoft® JScript
anchor Method

See Also

Language Reference 


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


"String Literal".anchor(anchorstring)

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


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"
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