+ 1

What is the uses of value attribute in Input tag?

tell me some examples

10th Mar 2017, 4:55 PM
Ravi Utsav
Ravi Utsav - avatar
2 Answers
+ 2
Cases I can think of right now: if you want a pre filled text input. if you want to pass a value through a hidden input. to display a text in the button of a submit input.
10th Mar 2017, 5:12 PM
CHMD
CHMD - avatar
+ 1
value attribute allows to 1. assign a default value for the said control at design time. For eg, <input type="text" name="n1" value="100"> 2. when form data is submitted for processing, it returns present data of the respective input
10th Mar 2017, 5:11 PM
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender)
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender) - avatar