HTML Audio / Video DOM src attribute
HTML Audio / Video DOM Reference
Examples
Change video sources:
myVid=document.getElementById("video1");
myVid.src="movie.ogg";
myVid.src="movie.ogg";
try it"
Definition and Usage
src property sets or returns the audio / video source current.
Browser Support
Internet Explorer 10, Firefox, Opera, Chrome and Safari support the src attribute.
Note: 9 and earlier versions of Internet Explorer does not support the src attribute.
grammar
Setting the src attribute:
audio|video .src= URL
Back src attribute:
audio|video .src
Property Value
值 | 描述 |
---|---|
URL | 规定音频/视频来源的 URL。
可能的值:
|
technical details
返回值: | 字符串值,当前的音频/视频来源。 |
---|
HTML Audio / Video DOM Reference