Javascript Going Back Multiple Times In History
I know to go back in history with JavaScript you use: window.history.back(); But how can I go back multiple times. e.g. to go back 4 times I tried: window.history.back().back().ba
Solution 1:
i = number of pages you want to go back
window.history.go(-i)
Solution 2:
Use history.go(-4)
. Source: MDN
Post a Comment for "Javascript Going Back Multiple Times In History"