0
Input types
Is there any way to deselect a radio input with it alteady being selected? Also is there a way for you to only select on checkboxes if thereâs four of them?
8 Answers
+ 1
You could do it with javascript, but...
the use of radio buttons is that exactly 1 MUST be selected and
the use of checkboxes is that MORE THAN 1 CAN be selected...
Can you elaborate why you want to achieve this behavior?
+ 1
Maybe something like this:
For radio buttons: On click of the item, revert the checked status if it is checked.
For checkboxes: On change count the number of checked boxes in the group and set an upper limit. Of the limit is reached, disable unchecked checkboxes until the number is below the limit
https://stackoverflow.com/questions/19001844/how-to-limit-the-number-of-selected-checkboxes#19001936
0
i was trying to make a quiz game with javascript and i was trying to use the input radio type.
0
And in your quiz, one should select only one item and you want to score "blank" questions differently?
0
yes, using javascript, html, and css
0
im not really understanding what theyâre saying it seems like theyâre using jquery or something else
0
also i did input onclick=âname()ââŠabd in javascript got the id and checked = false but when i would run it the radio button coudlnât be checked
0
datetime-local
month
week
date
time
password
color
file
email
tel
text
url