aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/length/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/window/length/index.html')
-rw-r--r--files/zh-cn/web/api/window/length/index.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/length/index.html b/files/zh-cn/web/api/window/length/index.html
new file mode 100644
index 0000000000..b5e37e034a
--- /dev/null
+++ b/files/zh-cn/web/api/window/length/index.html
@@ -0,0 +1,21 @@
+---
+title: window.length
+slug: Web/API/Window/length
+translation_of: Web/API/Window/length
+---
+<div>
+ {{ApiRef}}</div>
+<h2 id="Summary" name="Summary">概述</h2>
+<p>返回当前窗口中包含的框架数量(框架包括<code>frame</code>和<code>iframe</code>两种元素).</p>
+<h2 id="Syntax" name="Syntax">语法</h2>
+<pre class="syntaxbox"><i>framesCount</i> = window.length;
+</pre>
+<ul>
+ <li><code>framesCount</code>就是该窗口中框架的数量.</li>
+</ul>
+<h2 id="Example" name="Example">示例</h2>
+<pre class="brush:js">if (window.length) {
+ // 该窗口包含至少一个子框架
+}</pre>
+<h2 id="Specification" name="Specification">规范</h2>
+<p>{{DOM0}}</p>