window.history.go()
-
can i use history object like this in javascript window.history.go('http://www.google.com') becoz syntax in tutorial is " The go() method loads a specific page in the history list. Syntax history.go(number|URL) " Chohan
Chohan
-
can i use history object like this in javascript window.history.go('http://www.google.com') becoz syntax in tutorial is " The go() method loads a specific page in the history list. Syntax history.go(number|URL) " Chohan
Chohan
You can use both. See here.
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
You can use both. See here.
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
here is my code but only "window.history.go(-1)" works. on onclick event of button. Note:when i posted msg onclick replace with removed.so insted of removed here is onclick in code function gone() { window.history.go(-1) //window.history.go('http://www.google.com') //Go to nearest URL in history list with "javascriptkit.com" in the URL. }
Chohan
-
here is my code but only "window.history.go(-1)" works. on onclick event of button. Note:when i posted msg onclick replace with removed.so insted of removed here is onclick in code function gone() { window.history.go(-1) //window.history.go('http://www.google.com') //Go to nearest URL in history list with "javascriptkit.com" in the URL. }
Chohan
Is there more than one page in your history?
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
Is there more than one page in your history?
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
yeah .first i opend google page in browser then my on page.but it didnt open google page again when i click on button
Chohan
Try changing
window.history.go(-1)
towindow.history.go(-2)
.
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
Try changing
window.history.go(-1)
towindow.history.go(-2)
.
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
oh no.i dont wana give here number.-2 will also work.but i want to give here any "url".plz see the lines which are in comments in code
Chohan
Then you might want to use some thing like this:
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
oh no.i dont wana give here number.-2 will also work.but i want to give here any "url".plz see the lines which are in comments in code
Chohan
How about doing his the normal way and have: document.location = "http://google.com";
Brad Australian -CAUTION- The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.