Attributo di destinazione HTML <form>
Esempio
Visualizza la risposta ricevuta in una nuova finestra o scheda:
<form action="/action_page.php"
method="get" target="_blank">
<label for="fname">First name:</label>
<input type="text" id="fname"
name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<input
type="submit" value="Submit">
</form>
Definizione e utilizzo
L' target
attributo specifica un nome o una parola chiave che indica dove visualizzare la risposta ricevuta dopo l'invio del modulo.
L' target
attributo definisce un nome o una parola chiave per un contesto di navigazione (ad es. scheda, finestra o frame inline).
Supporto del browser
Attribute | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
Sintassi
<form target="_blank|_self|_parent|_top|framename">
Valori di attributo
Value | Description |
---|---|
_blank | The response is displayed in a new window or tab |
_self | The response is displayed in the same frame (this is default) |
_parent | The response is displayed in the parent frame |
_top | The response is displayed in the full body of the window |
framename | The response is displayed in a named iframe |
❮ Tag HTML <modulo>