About

Breaking

Monday 22 May 2017

The Name Attribute


Each input field must have a name attribute to be submitted.
If the name attribute is omitted, the data of that input field will not be sent at all.
This example will only submit the "Last name" input field:


प्रत्येक इनपुट फ़ील्ड में प्रस्तुत करने के लिए एक नाम विशेषता होना चाहिए।

यदि नाम विशेषता छोड़ी जाती है, तो उस इनपुट फ़ील्ड का डेटा बिल्कुल भी नहीं भेजा जाएगा।

यह उदाहरण केवल "अंतिम नाम" इनपुट फ़ील्ड को जमा करेगा:


<html>
<body>

<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>




 

No comments:

Post a Comment