代码示例:(标识:jsck_history_go)
<!DOCTYPE html>
<html>
<body>

<h1>Window History 对象</h1>

<h2>history.go() 方法</h2>

<button onclick="history.go(-2)">后退两页</button>

<p>点击“后退两页”不会导致任何动作,因为历史列表中没有前一页。</p>

</body>
</html>
运行结果: