English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Window frameElement property

JavaScript Window-Objekt

frameElementA read-only property returns the element in which the embedded window is located (for example, <iframe> or <object>).

If the document window is not placed within an <iframe> or <object>, the return value of this attribute isnull.

Despite the name of this attribute, it still applies to a document embedded in any embedding point, including <object>, <iframe> or <embed>.

Hinweis:Dieses Attribut gilt auch für das <frame>-Element. Aber HTML5Der <frame>-Element wird nicht unterstützt.

Syntax:

window.frameElement
var myframe = window.frameElement;
  
if (myframe) { 
   myframe.src = "https://de.oldtoolbag.com/";
}
Testen Sie heraus‹/›

Browserkompatibilität

frameElement-Eigenschaft wird von allen Browsern vollständig unterstützt:

Eigenschaft
frameElementJaJaJaJaJa

Technische Details

Rückgabewert:IFrame-Objekt, es ist der Host der aktuellen Fenster im Eltern-Dokument, andernfalls null

Zusammenhängende Referenzen

Fenster (Window) Referenz:window.frames-Attribut

Fenster (Window) Referenz:window.parent-Attribut

Tag-Referenz:HTML <embed>-Tag

Tag-Referenz:HTML <object>-Tag

Tag-Referenz:HTML <iframe>-Tag

JavaScript Window-Objekt