Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript String Object link Method

Places an HTML anchor <A> with an HREF attribute around the text in a String object.

Syntax: JScript String Object link Method

strVariable.link(linkstring)

"String Literal".link(linkstring)

Arguments: JScript String Object link Method

strVariable

The name of a String object.

linkstring

The text that you want to place in the HREF attribute of the HTML anchor.

Remarks: JScript String Object link Method

Call the link method to create a hyperlink out of a String object. The following is an example of how the method accomplishes this:

var strVariable = "This is a hyperlink";

strVariable = strVariable.link("http://www.microsoft.com");

The value of strVariable after the last statement is:

<A HREF="http://www.microsoft.com">This is a hyperlink</A>

No check is done to see if the tag already exists

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.