HTML DOM Embed Object

Embed object

The Embed object is a new object in HTML5.

The Embed object represents the HTML <embed> element.

Access Embed object

You can access <embed> elements using getElementById():

var x = document.getElementById("myEmbed");

Try it yourself

Create Embed object

You can create <embed> elements using the document.createElement() method:

var x = document.createElement("EMBED");

Try it yourself

Embed object properties

属性 Description
height Set or return the value of the height attribute of the embed element.
src Set or return the value of the src attribute of the embed element.
type Set or return the value of the type attribute of the embed element.
width 设置或返回 embed 元素中 width 属性的值。

标准属性和事件

Embed 对象支持标准属性事件

相关页面

HTML 教程:HTML 插件

HTML 参考手册:HTML <embed> 标签