Syntax
string.link(URL)
The link() method converts the string to an instance of the tag, setting the HREF attribute to the URL that is passed.
<html> <script language="JavaScript"> <!-- var myString = new String("The online book!"); document.write(myString.link('http://www.java2java.com')); document.close(); --> </script> </html>