HTML DOM Embed 对象

Embed 对象

Embed 对象是 HTML5 中的新对象。

Embed 对象表示 HTML <embed> 元素。

访问 Embed 对象

您可以通过使用 getElementById() 来访问 <embed> 元素:

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

亲自试一试

创建 Embed 对象

您可以通过使用 document.createElement() 方法来创建 <embed> 元素:

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

亲自试一试

Embed 对象属性

属性描述
height设置或返回 embed 元素中 height 属性的值。
src设置或返回 embed 元素中 src 属性的值。
type设置或返回 embed 元素中 type 属性的值。
width设置或返回 embed 元素中 width 属性的值。

标准属性和事件

Embed 对象支持标准属性事件

相关页面

HTML 教程:HTML 插件

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