window.location.href is not a method,
it's a property that will tell you the current URL location of the
browser. Setting the property to something different will redirect the
page.
window.open() is a method that you can pass a URL to that you want to open in a new window. Forexample:
window.location.href example:
window.location.href = 'phplessonstips.blogspot.in'; //Will take you to phplessonstips blog.
window.open() example:window.open('phplessonstips.blogspot.in'); //This will open phplessonstips.blogspot.in in a new window.
No comments:
Post a Comment