HTML DOM EmbedObject
Embed Object
The Embed Object is new in HTML5.
The Embed object represents an HTML <embed> element.
Access an Embed Object
You can use getElementById() to access an <embed> element:
var
x = document.getElementById("myEmbed");
Try it Yourself
Create an Embed Object
You can use document.createElement() to create an <embed> element:
var x = document.createElement("myEmbed");
Try it Yourself
Embed Object Properties
| Property | Description |
|---|---|
| height | Sets or returns the height of the embedded file (the height attribute value) |
| src | Sets or returns the src attribute value of the embed element (the embedded file URL) |
| type | Sets or returns the type attribute value of the embed element (the embedded file type) |
| width | Sets or returns the width of the embedded file (the width attribute value) |
Standard Properties and Events
The Embed object also supports standardPropertiesandEvents。
Related Articles
HTML Reference Manual:HTML <embed> Tag
Other Extensions