+ 2

What’s the name tag inside input do?

28th Jan 2018, 9:29 AM
Deva Vikaas
Deva Vikaas - avatar
2 ответов
+ 9
The name attribute specifies the name of an <input> element. The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted. Note: Only form elements with a name attribute will have their values passed when submitting a form. https://www.w3schools.com/tags/att_input_name.asp
28th Jan 2018, 9:40 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 1
When a form is submitted, its data gets transmitted as a set of name=value tokens. The receiving framework can then interpret these - e.g. in php they become the $_GET and $_POST associative arrays.
28th Jan 2018, 11:43 AM
Ariphaos
Ariphaos - avatar