HTML <form> nome Attributo
Esempio
Un modulo HTML con un attributo name:
<form
action="/action_page.php"
method="get" name="myForm">
<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="button" onclick="formSubmit()" value="Send form data!">
</form>
Definizione e utilizzo
L' name
attributo specifica il nome di un modulo.
L' name
attributo viene utilizzato per fare riferimento a elementi in un JavaScript o per fare riferimento ai dati del modulo dopo l'invio di un modulo.
Supporto browser
Attribute | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
Sintassi
<form name="text">
Valori di attributo
Value | Description |
---|---|
text | Specifies the name of the form |
❮ Tag HTML <modulo>