var currentLocation = window.location;
Basic Structure of a URL
You can use the href property of the Location object.
window.location.href = "http://www.stackoverflow.com";
You can use assign() and replace methods also to redirect to other pages like these
You can change the location object href property using jQuery also like this