0

Why is value used.?

21st Jan 2017, 10:28 AM
Rohan Giri
Rohan Giri - avatar
3 Réponses
+ 11
"value" is used on <input>s instead of innerHTML : <input type="text">Text</input> <-this should be replaced with -> <input type="text" value="Text">
21st Jan 2017, 10:31 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
Hey Mr. Giri: The value attribute is used in the "Checkbox" and "Radio" input element because it's ( defining ) the value associated with the input! Also, it is the value which is then sent on "Submit." Hope that helps if you were still wondering. I reference http://www.w3schools.com/ A LOT. If I run across something I'm unsure of, I go there! Or, this guy covers pretty much everything you could run into from Html-Css-Javascript-Angular-jQuery-React and now D3 https://www.youtube.com/user/pizzapokerguy87 in depth with REAL PROJECTS! Hope that help you out. Good Luck!
22nd Jan 2017, 3:04 PM
Jesse G
Jesse G - avatar
0
nay
25th Jan 2017, 3:59 PM
Nay MyoHtet
Nay MyoHtet - avatar