The Source object represents an HTML <source> element.
You can access a <source> element by using getElementById():
You can create a <source> element by using the document.createElement() method:
Property | Description |
---|---|
media | Sets or returns the value of the media attribute in a <source> element |
src | Sets or returns the value of the src attribute in a <source> element |
type | Sets or returns the value of the type attribute in a <source> element |
The Source object also supports the standard properties and events.
HTML tutorial: HTML5 Video
HTML tutorial: HTML5 Audio
HTML reference: HTML <source> tag
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!