Make String link
<html> <body> <button onclick="var myS = new String('Java2s.com Home Page'); alert(myS.link('http://www.java2s.com/'));">String LINK</button> </body> </html>