HTML DOM Embed height property
Examples
Modify the embedded file a height of 500 pixels:
document.getElementById("myEmbed").height="500";
try it"
Definition and Usage
height property sets or returns the value <embed> element height attribute.
height attribute describes the height of the embedded file in pixels.
Tip: Use the width property to set the value of the <embed> element width attribute.
Browser Support
All major browsers support height attributes.
grammar
Back height attributes:
embedObject .height
Setting the height property:
embedObject .height= pixels
Property Value
值 | 描述 |
---|---|
pixels | 描述了嵌入内容的高度,以像素计。 (如: height="100") |
technical details
return value: | Number that is the height of the embedded file in pixels. |
---|
More examples
Examples
Returns the height of the embedded files:
var x = document.getElementById("myEmbed").height;
x The output is:
200
try it"
Examples
Modify the embedded document height and width of 500 pixels:
document.getElementById("myEmbed").height="500";
document.getElementById("myEmbed").width="500";
document.getElementById("myEmbed").width="500";
try it"
Related Pages
HTML Reference Manual: HTML <the embed> height property
Embed the object