From 589a13882aedb44174c9021e907e7f1a1c501e20 Mon Sep 17 00:00:00 2001 From: T34-active Date: Tue, 20 Aug 2024 11:59:00 +0800 Subject: [PATCH 1/2] [zh-cn]: update the translation of Window `length` property --- files/zh-cn/web/api/window/length/index.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/files/zh-cn/web/api/window/length/index.md b/files/zh-cn/web/api/window/length/index.md index 27257d3c076759..ba4018069ac4b4 100644 --- a/files/zh-cn/web/api/window/length/index.md +++ b/files/zh-cn/web/api/window/length/index.md @@ -1,27 +1,23 @@ --- -title: window.length +title: Window:length 属性 slug: Web/API/Window/length +l10n: + sourceCommit: 62cedc63226017e9e7d0718b6fea3529ca8dbf37 --- -{{ApiRef}} +{{APIRef}} -## 概述 +返回窗口中框架的数量(包括 {{HTMLElement("frame")}} 或 {{HTMLElement("iframe")}} 元素)。 -返回当前窗口中包含的框架数量 (框架包括`frame`和`iframe`两种元素). +## 值 -## 语法 - -```plain -framesCount = window.length; -``` - -- `framesCount`就是该窗口中框架的数量。 +数字。 ## 示例 ```js if (window.length) { - // 该窗口包含至少一个子框架 + // 这是一个包含子框架的文档。 } ``` From 21ace2a9b771786033fd81686e87b95e684844e8 Mon Sep 17 00:00:00 2001 From: A1lo Date: Tue, 20 Aug 2024 20:09:29 +0800 Subject: [PATCH 2/2] Update files/zh-cn/web/api/window/length/index.md --- files/zh-cn/web/api/window/length/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/zh-cn/web/api/window/length/index.md b/files/zh-cn/web/api/window/length/index.md index ba4018069ac4b4..e402cff6c432c3 100644 --- a/files/zh-cn/web/api/window/length/index.md +++ b/files/zh-cn/web/api/window/length/index.md @@ -7,7 +7,7 @@ l10n: {{APIRef}} -返回窗口中框架的数量(包括 {{HTMLElement("frame")}} 或 {{HTMLElement("iframe")}} 元素)。 +返回窗口中框架的数量(包括 {{HTMLElement("frame")}} 和 {{HTMLElement("iframe")}} 元素)。 ## 值