ヒストリ(History)

[up] [prev] [next]

■ 一覧

back(), current, forward(), go(), history, length, next, previous

■ 戻ると進む

window.history (e3/N2)

ひとつ前に見ていたページ、ふたつ前に見ていたページなどの、ウィンドウのヒストリ情報を保持、制御するオブジェクトです。

window.history.length (e3/N2)

ヒストリの個数を返します。

window.history.current (N3)
window.history.next (N3)
window.history.previous (N3)

ヒストリ上の、現在の(current)、次の(next)、前の(previous)アドレス(URL)を示す文字列を返します。

window.history.back() (e3/N2)
window.history.forward() (e3/N2)
window.history.go(n) (e3/N2)

back() はひとつ前のページに、forward() はひとつ先のページに、go(n) は n 個先のページにジャンプします。n に負数を指定することもできます。

<a href="#" onclick="history.back(); return false;">[戻る]</a>

[up] [prev] [next]
Copyright (C) 1996-2001 杜甫々
改訂版初版:2002年7月18日
http://www.tohoho-web.com/js/history.htm