Using the String Object's Link Method
<HTML> <HEAD> <TITLE> A link is a link is a link... </TITLE> </HEAD> <BODY> <H1> <SCRIPT> linkText = "Apress"; document.write(linkText.link("http://www.java2s.com")); </SCRIPT> </H1> </BODY> </HTML>