English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
framesA read-only property returns an object similar to an array, representing all <iframe> elements in the current window.
You can access each <iframe> element using an index number, and the index starts from 0.
Useframes.lengthReturns the number of frames in the current window (including IFRAMES).
Note :This property also applies to <frame> elements. However, HTML5The <frame> element is not supported.
window.frames
var fr = window.frames; fr[0].location = "https:"//fr.oldtoolbag.com/css-référence/";Vérifiez et voyez‹/›
Tous les navigateurs supportent complètement la propriété frames :
Propriété | |||||
frames | Oui | Oui | Oui | Oui | Oui |
Valeur de retour : | Retourne une référence à l'objet fenêtre, représentant le nombre de frames dans la fenêtre actuelle |
---|
Parcourir tous les frames et modifier la position de tous les frames :
var list = ["/tags/", "/css-référence/", "/jsref/", "/bootstrap/]; var fm = window.frames; for (let i = 0; i < fm.length;++) { fm[i].location = list[i]; }Vérifiez et voyez‹/›
Référence fenêtre (Window) :Propriété window.frameElement
Référence fenêtre (Window) :Propriété window.parent
Référence des balises :Balise <iframe> HTML