Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Question in <input> , the attribute value between radio & checkbox āļø?
In the checkbox type they used value="1" & value="2" <input type="checkbox" name="gender" value="1" />Male <br /> <input type="checkbox" name="gender" value="2" />Female <br /> But in radio type they used a vlue="male" & value="female" <input type="radio" name="gender" value="male" />Male <br /> <input type="radio" name="gender" value="female" />Female <br />
2 Respostas
+ 4
Tarik HAMDOUNI TheĀ valueĀ attribute for <input> element in HTML is used to specify the initial value of the input element. It has different meaning for different input type:
The ābuttonā, āresetā and āsubmitā property specifies the text on the button.
The ātextā, āpasswordā and āhiddenā property specifies the initial value of the input field.
The ācheckboxā, āradioā and āimageā property specifies the value associated with the input.
+ 3
You can use any value for "value" attribute .even you can set value of radio type 1 & 2 .