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 属性的值。
此在线速查手册由www.w♣▣▤3♣▣▤x♣▣▤u♣▣▤e.com提供,请勿盗用!

标准属性和事件

Embed 对象支持标准属性事件