aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/stop/index.html
blob: dc65485d75786fb3d387de1483ce22a7d1ee11a5 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: Window.stop()
slug: Web/API/Window/stop
tags:
  - API
  - DOM
  - Window
  - 参考
  - 方法
translation_of: Web/API/Window/stop
---
<div> {{APIRef}}</div>

<p><strong><code>window.stop()</code></strong> 方法的效果相当于点击了浏览器的停止按钮。由于脚本的加载顺序,该方法不能阻止已经包含在加载中的文档,但是它能够阻止图片、新窗口、和一些会延迟加载的对象的加载。</p>

<h2 id="语法">语法</h2>

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

<h2 id="示例">示例</h2>

<pre class="brush:js">window.stop();
</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG','browsers.html#dom-window-stop','Window.stop()')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'browsers.html#dom-window-stop', 'Window.stop')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td></td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("api.Window.stop")}}</p>