Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

window.length

概述

返回当前窗口中包含的框架数量(框架包括frameiframe两种元素).

语法

framesCount = window.length;
  • framesCount就是该窗口中框架的数量.

示例

if (window.length) {
  // 该窗口包含至少一个子框架
}

规范

DOM Level 0 不属于任何标准.

文档标签和贡献者

 此页面的贡献者: teoli, basemnassar11, ziyunfei
 最后编辑者: basemnassar11,