English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
lengthreturns the number of frames in the current window (including IFRAMES).
This property is usually used withwindow.framesproperties are used together.
Note: HTML5The <frame> element is not supported.
window.length
var x = window.length;Test and See‹/›
All browsers fully support the length property:
Property | |||||
length | Yes | Yes | Yes | Yes | Yes |
Return Value: | A number representing the number of frames in the current window |
---|
Traverse all frames and change the position of all frames:
var list = ["/tags/tag-", "/css-reference/", "/jsref/", "/bootstrap/]; var fm = window.frames; for (let i = 0; i < fm.length;++) { fm[i].location = list[i]; }Test and See‹/›
Window (Window) Reference:window.frames Property
Window (Window) Reference:window.frameElement Property
Tag Reference:HTML <iframe> Tag