How to use currentSrc in html5
This article is about how to use currentSrc in html5. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Example
Get the URL of the current video:
MyVid=document.getElementById ("video1"); alert (myVid.currentSrc)
Definition and usage
CurrentSrc is familiar with URL that returns the current audio / video.
If audio / video is not set, an empty string is returned.
Browser support
All major browsers support the currentSrc attribute.
Note: this property is not supported by Internet Explorer 8 or earlier browsers.
Grammar
Audio | video.currentSrc
Technical details
Returns a value string that represents the current URL of the audio / video
Example
Get the URL of the current video: