Assign a URL to location
<html> <body> <script language="JavaScript"> function function1() { location.assign("http://www.java2s.com/"); } </script> <input type="button" value="Load new page" onclick="function1();"> </body> </html>