Javascript method to navigate to another url

This may be a dumb question, but is there a Javascript method to look for another URL from an existing window, not window.open (), which will open another window

So, is something that edits window.document.URL (maybe) and updated? not sure if his client side

+5
source share
4 answers

you can use

window.location="http://www.dignaj.com";

You can also use navigation like this (only works in IE)

window.navigate("http://www.dignaj.com");
+11
source
window.location.href = "http://example.com";
+12
source
window.location = "http://stackoverflow.com/"

:

window.location.href = "http://stackoverflow.com/"

, reload:

window.location.reload(true);

:

https://developer.mozilla.org/en/DOM/window.location

+3

, , :

window.location.replace('http://www.google.ch')
0

All Articles