The go() method loads a specific URL from the history list.
The parameter can either be a number which goes to the URL within the specific position (-1 goes back one page, 1 goes forward one page), or a string. The string must be a partial or full URL, and the function will go to the first URL that matches the string.
The go() method is supported in all major browsers.
Click on the button to go back two pages:
The output of the code above will be:
Your message has been sent to W3Schools.