aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/back/index.html
blob: ead8d52bb6445d0133625afaf80dcfc78be06ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
title: Window.back()
slug: Web/API/Window/back
translation_of: Web/API/Window/back
---
<div>{{APIRef}}</div>

<div>{{ Non-standard_header() }}</div>

<div>{{ obsolete_header(31) }}</div>

<h2 id="Summary" name="Summary">总结</h2>

<p>跳转窗口到history中的前一个地址, 这曾是 Gecko 的方法。请使用标准的history.back 替代它。</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="syntaxbox"><code>window.back()</code></pre>

<h2 id="Example" name="Example">Example</h2>

<pre class="brush:js">function goBack() {
   if ( canGoBack ) window.back();
}</pre>

<h2 id="Specification" name="Specification"> </h2>