<html> <head> <title>location.replace() Method</title> <script type="text/javascript"> function doReplace() { location.replace("http://www.java2java.com"); } </script> </head> <body> <form name="myForm"> <input type="button" value="Replace Me" onclick="doReplace()" /> </form> </body> </html>