javascript go() method


  Translation results:

英[gəʊ] 美[goʊ]

vi.Go; leave; do; carry on

vt.Become; make a sound... ; to be; to be in a state of...

n.The order of one's turn; energy; motivation; to try

Third person singular: goes Plural: goes Present participle: going past tense: went past participle: gone

javascript go() methodsyntax

Function:Load a specific page in the history list.

Syntax: history.go(number|URL)

Description: The URL parameter uses the URL to be accessed, or a subtitle of the URL string. The number parameter uses the relative position of the URL to be accessed in the URL list of History.

javascript go() methodexample

<html>
<head>
<script type="text/javascript">
function goBack()
  {
  window.history.go(-1)
  }
</script>
</head>
<body>

<input type="button" value="Back" onclick="goBack()" />

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A