Embed src Property
Example
Return the URL of an embedded file:
var x = document.getElementById("myEmbed").src;
Try it Yourself »
Definition and Usage
The src property sets or returns the value of the src attribute in an embed element.
The src attribute specifies the address (URL) of the external file to embed.
Browser Support
Property | |||||
---|---|---|---|---|---|
src | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the src property:
embedObject.src
Set the src property:
embedObject.src = URL
Property Values
Value | Description |
---|---|
URL |
Specifies the address (URL) of the external file to embed. Possible values:
|
Technical Details
Return Value: | A String, representing the URL of the embedded file. Returns the entire URL, including the protocol (like http://) |
---|
Related Pages
HTML reference: HTML <embed> src attribute
❮ Embed Object