Incorpora proprietà src
Esempio
Restituisce l'URL di un file incorporato:
var x = document.getElementById("myEmbed").src;
Definizione e utilizzo
La proprietà src imposta o restituisce il valore dell'attributo src in un elemento di incorporamento.
L'attributo src specifica l'indirizzo (URL) del file esterno da incorporare.
Supporto del browser
Property | |||||
---|---|---|---|---|---|
src | Yes | Yes | Yes | Yes | Yes |
Sintassi
Restituisce la proprietà src:
embedObject.src
Imposta la proprietà src:
embedObject.src = URL
Valori di proprietà
Value | Description |
---|---|
URL |
Specifies the address (URL) of the external file to embed. Possible values:
|
Dettagli tecnici
Valore di ritorno: | Una stringa, che rappresenta l'URL del file incorporato. Restituisce l'intero URL, incluso il protocollo (come http://) |
---|
Pagine correlate
Riferimento HTML: attributo HTML <embed> src
❮ Incorpora oggetto