HTML DOM Source 对象
Source 对象
Source 对象是 HTML5 中的新对象。
Source 对象表示 HTML <source> 元素。
访问 Source 对象
您可以通过使用 getElementById() 来访问 <source> 元素:
var x = document.getElementById("mySource");
创建 Source 对象
您可以通过使用 document.createElement() 方法来创建 <source> 元素:
var x = document.createElement("SOURCE");
Source 对象属性
属性 | 描述 |
---|---|
media | 设置或返回 <source> 元素中 media 属性的值。 |
src | 设置或返回 <source> 元素中 src 属性的值。 |
type | 设置或返回 <source> 元素中 type 属性的值。 |
此在线速查手册由www.wノ◢3ノ◢xノ◢uノ◢e.com提供,请勿盗用!