/

HTML / CSS / JavaScript Tutorial

JavaScript History method: go()

[this page | pdf | back links]

The go() method (when applied to History objects in the JavaScript BOM) loads a URL from the history list.

 

It has the following syntax with the following parameters. It does not return a value.

 

history.go(param)

 

Parameter

Required / Optional

Description

param

Required

Either a number indicating where within the history list to go to (e.g. -1 goes back a page, +1 goes forward a page), or a string representing a partial or full URL (method will go to first URL that matches the string)

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile