Attributo del nome <iframe> HTML
Esempio
Un <iframe> che funge da destinazione per un collegamento:
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a>
Definizione e utilizzo
L' name
attributo specifica un nome per un iframe.
Questo name
attributo può essere utilizzato per fare riferimento all'elemento in un JavaScript, o come valore target
dell'attributo di un elemento
<a>
o <form>
, o come
formtarget
attributo di un elemento <input>
o
<button>
.
Supporto browser
Attribute | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
Sintassi
<iframe name="name">
Valori di attributo
Value | Description |
---|---|
name | Specifies a name for the <iframe> |
❮ Tag HTML <iframe>