Vlastnost výšky prvku IFrame
Příklad
Změna výšky prvku iframe:
document.getElementById("myFrame").height = "400";
Definice a použití
Vlastnost height nastavuje nebo vrací hodnotu atributu height v prvku iframe.
Atribut height určuje výšku prvku iframe.
Tip: Pomocí vlastnosti width nastavte nebo vraťte hodnotu atributu width v prvku iframe.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
height | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost height:
iframeObject.height
Nastavte vlastnost height:
iframeObject.height = pixels
Hodnoty vlastností
Value | Description |
---|---|
pixels | The height in pixels (like "100px" or just "100") |
Technické údaje
Návratová hodnota: | Řetězec představující výšku prvku iframe v pixelech |
---|
Další příklady
Příklad
Vraťte výšku prvku iframe:
var x = document.getElementById("myFrame").height;
Příklad
Změna výšky a šířky prvku iframe:
document.getElementById("myFrame").height = "400";
document.getElementById("myFrame").width = "400";
Související stránky
HTML reference: HTML atribut výšky <iframe>
❮ Objekt IFrame