Form with a text fields without a name attribute

Example

<!DOCTYPE html>
<html>
<body>

<h2>The name Attribute</h2>

<form action=”/action_page.php”>
First name:<br>
<input type=”text” value=”Mickey”>
<br>
Last name:<br>
<input type=”text” name=”lastname” value=”Mouse”>
<br><br>
<input type=”submit” value=”Submit”>
</form>

<p>If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.</p>

<p>Notice that the value of the “First name” field will not be submitted, because the input element does not have a name attribute.</p>

</body>
</html>

Output

The name Attribute

First name:

Last name:


If you click the “Submit” button, the form-data will be sent to a page called “/action_page.php”.

Notice that the value of the “First name” field will not be submitted, because the input element does not have a name attribute.

Updated: February 4, 2019 — 8:59 am
Java Script © 2019