+ 1

What is the point of the name and value attributes?

Please help me! what is the point of the name and value attributes in <input type="radio" name="gender" value="male"/> male <br /> I feel like indicating that it is gender has nothing to do with it. and that the value="male" also has nothing to do with it because it is the "male" that is outside the > that displays the text.

23rd Jan 2016, 10:35 PM
Lexus Cruz
Lexus Cruz - avatar
5 ответов
+ 2
When you'll submit form data, names and values will form key-values for processing on server.
5th Jun 2016, 4:08 PM
Evgeniy
+ 2
name should be used so tht only one is selected from radio buttons having same name and value is used while retrieving the selected radio button value
19th Aug 2016, 1:31 AM
Samkitkumar Jain
Samkitkumar Jain - avatar
+ 1
name is like a variable in php... and male in value gives its "value" and outside the tags is just for display... Example: name = animal value = dog... It is just like Var animal = dog
2nd Mar 2016, 5:52 AM
AJ Carlos
AJ Carlos - avatar
0
a bit confusing shaa
4th Jun 2016, 7:31 AM
Cele Prince
Cele Prince - avatar
0
Bueno yo solo hablo español Espero alguien que hable español vea esta respuesta
18th Jun 2016, 5:33 PM
Jose Daniel
Jose Daniel - avatar