指定したページ分移動する
サンプルソース
<input type="button" value="2つ前へ移動" onclick="history.go(-2)"> <input type="button" value="2つ次へ移動" onclick="history.go(2)"> |
解説
キャッシュが有効なページが存在する場合のみ、前または次のページに移動します。history.go()・・・指定したページ分移動する
実行結果
関連する内容
<input type="button" value="2つ前へ移動" onclick="history.go(-2)"> <input type="button" value="2つ次へ移動" onclick="history.go(2)"> |