Get the URL of an audio file:
The result of x will be:
The src property sets or returns the value of the src attribute of an audio.
The src attribute specifies the location (URL) of the audio file.
The src property is supported in all major browsers. However, the file format defined may not be supported in all browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <audio> element.
Return the src property:
Set the src property:
Value | Description |
---|---|
URL |
Specifies the URL of the audio file. Possible values:
|
Return Value: | A String, representing the URL of the audio file. Returns the entire URL, including the protocol (like http://) |
---|
HTML reference: HTML <audio> src attribute