From 102929bdc1ac09346145941c711bb36407ea4870 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 11 Mar 2022 01:11:41 +0900 Subject: 2022/01/28 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/api/history/forward/index.md | 86 +++++++++++++------------------ 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/files/ja/web/api/history/forward/index.md b/files/ja/web/api/history/forward/index.md index 5e55df100b..1788518a25 100644 --- a/files/ja/web/api/history/forward/index.md +++ b/files/ja/web/api/history/forward/index.md @@ -5,67 +5,51 @@ tags: - API - HTML DOM - History - - History API - - Method - - Reference - - Web + - 履歴 API + - メソッド + - リファレンス +browser-compat: api.History.forward translation_of: Web/API/History/forward --- -
{{APIRef("History API")}}
+{{APIRef("History API")}} -

History.forward() メソッドにより、ブラウザーはセッション履歴の一つ次のページに移動します。これは {{domxref("History.go", "history.go(1)")}} を呼び出すのと同じ効果があります。

+**`History.forward()`** メソッドにより、ブラウザーはセッション履歴の 1 つ次のページに移動します。これは {{domxref("History.go", "history.go(1)")}} を呼び出すのと同じ効果があります。 -

このメソッドは{{glossary("asynchronous", "非同期")}}です。移動が完了したことを検知したい場合は {{event("popstate")}} イベントのリスナーを追加してください。

+このメソッドは{{glossary("asynchronous", "非同期")}}です。移動が完了したことを検知したい場合は {{domxref("Window/popstate_event", "popstate")}} イベントのリスナーを追加してください。 -

構文

+## 構文 -
history.forward()
+```js +history.forward() +``` -

+## 例 -

以下の例では、セッション履歴の一つ次のステップへ進めるボタンを作成します。

+以下の例では、セッション履歴の 1 つ次のステップへ進めるボタンを作成します。 -

HTML

+### HTML -
<button id='go-forward'>Go Forward!</button>
+```html + +``` -

JavaScript

+### JavaScript -
document.getElementById('go-forward').addEventListener('click', e => {
+```js
+document.getElementById('go-forward').addEventListener('click', e => {
   window.history.forward();
-})
- -

仕様書

- - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("HTML WHATWG", "browsers.html#history", "History")}}{{Spec2("HTML WHATWG")}}{{SpecName("HTML5 W3C")}} から変更なし
{{SpecName("HTML5 W3C", "browsers.html#history", "History")}}{{Spec2("HTML5 W3C")}}初回定義
- -

ブラウザーの互換性

- -

{{Compat("api.History.forward")}}

- -

関連情報

- - +}) +``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} + +## 関連情報 + +- {{domxref("History")}} +- [履歴 API での作業](/ja/docs/Web/API/History_API/Working_with_the_History_API) -- cgit v1.2.3-54-g00ecf