Thursday 6 April 2017

Javascript method to navigate to other url




Probably a stupid question, but is there a Javascript method to browse another url, from the existing window, not window.open() that would open another window



So something that edit the window.document.URL (possible) and refresh? not sure its possible client-side


Answer



You can use



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



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



window.navigate("http://www.dignaj.com");

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...