An HTML form with a name attribute.
The name
attribute specifies the name of a form.
The name
attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.
<form name="text">
Value | Description |
---|---|
text | Specifies the name of the form |
Example:
HTML
<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>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |