HTML DOM Embed src Property |
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
JavaScript Reference
JavaScript Objects
JavaScript Array Object JavaScript Boolean Object JavaScript Date Object JavaScript Math Object JavaScript Number Object JavaScript String Object JavaScript RegExp Object JavaScript Global Properties/Functions JavaScript Operators JavaScript Error
Browser Objects
Window Object Navigator Object Screen Object History Object Location Object Storage Object
DOM Objects
HTML DOM Document Object HTML DOM Element Object HTML DOM Attribute Object HTML DOM Event Object HTML DOM Console Object CSSStyleDeclaration Object DOM HTMLCollection
HTML Objects
<a> <area> <audio> <base> <blockquote> <body> <button> <canvas> <col> <colgroup> <datalist> <del> <details> <dialog> <embed> <fieldset> <form> <iframe> <frameset > <img> <ins> <input> - button <input> - checkbox <input> - color <input> - date <input> - datetime <input> - datetime-local <input> - email <input> - file <input> - hidden <input> - image <input> - month <input> - number <input> - range <input> - password <input> - radio <input> - reset <input> - search <input> - submit <input> - text <input> - time <input> - url <input> - week <keygen> <link> <label> <legend> <li> <map> <menu> <menuItem> <meta> <meter> <object> <ol> <optgroup> <option> <param> <progress> <q> <script> <select> <source> <style> <table> <td> <th> <tr> <textarea> <title> <time> <track> <video>
HTML DOM Embed height Property
Deep Dive
- Web Service
- Scripting
- Programming
- Scripting Languages
- Computer Science
- Web Design & Development
- Web Services
- Programming Languages
- Software
- Development Tools
Embed src Property
Example
Return the URL of the embedded file:
var x = document.getElementById("myEmbed").src;
x output will be:
http://www.w3cschool.cc/jsref/helloworld.swf
Definition and Usage
The src property sets or returns the value of the src attribute of an embed element.
The src property describes the external address (URL) of the embedded file.
Browser Support
The src property is supported by all major browsers.
Syntax
Return the src property:
embedObject.src
Set the src property:
embedObject.src=URL
Property Values
| Value | Description |
|---|---|
| URL | Describes the external address (URL) of the embedded file. Possible values:
|
Technical Details
| Return Value: | A String, representing the URL of the embedded file. Returns the full URL, including the protocol part (http://). |
|---|
Related Pages
HTML Reference: HTML <embed> src Attribute
YouTip