0

What's the use of name and value attributes of form tag in html?

in the code below, if i change the values of 'name' and 'value' attributes, the output remains the same..then what's the use of those attributes? https://code.sololearn.com/W7hRZguq2z3s/?ref=app

4th Apr 2018, 9:26 AM
Ravindra Desai
Ravindra Desai - avatar
4 Answers
+ 1
Try with type="text", you’ll see the difference and maybe you will understand ;)
4th Apr 2018, 9:40 AM
Chalza
Chalza - avatar
+ 1
oh great..but still "name" attribute remains unexplained..
4th Apr 2018, 9:57 AM
Ravindra Desai
Ravindra Desai - avatar
0
I think it’s like id,class : you can reference it by document.getElementByName();
4th Apr 2018, 9:59 AM
Chalza
Chalza - avatar
0
In javascript
4th Apr 2018, 10:00 AM
Chalza
Chalza - avatar