document.location = "newPage.html";
Note: you can use absolute URLs (http://example.org/) or relative paths ("../dir/page.htm").
// Send visitors to a new page after one second:
setTimeout( "document.location='newPage.html'" , 1000 );
document.location.replace( "newPage.html" ); // Erase redirector from history
var secure = document.URL.replace(/^http:/,"https:");
location.replace( secure );
Tip: document.URL is a readonly property, use document.location to modify the current URL.
document.getElementById("myForm").submit();
Note: if the form has an ID, use getElementById(); otherwise, use getElementsByTagName(). document.getElementsByTagName("form")[0].submit(); // First form on page
document.location = "/" ; // Homepage on current domain / sub-domain
document.location = "/page.htm"; // Different page in root directory
document.location = "./" ; // Current directory's landing page
document.location = "./newPage.html"; // Other page in same directory
document.location = "newPage.html" ; // Same as above
document.location = "../"; // Up one directory, to landing page
document.location = "../newPage.html"; // To another page, up one directory
header('location: ../'); // Go up one level
exit; // Stop executing any PHP code left on the page
// Pass 'true' as second optional argument to stop executing current page:
Response.Redirect("../", true); // Semi-colon for C#, none for VB