They all have different name attribute values – therefore they can only be checked (because they’re not comparing to another sibling radio value). I think you might be looking for type="checkbox" instead:
I have some radio buttons in my web page.
when clicking the radio button it checks but when i click again it doesn’t un-check.
i tried to add a JS function onclick
JavaScript does not require semicolons necessarily. I tried but it didn’t make any difference.
Comment posted by w3schools.com/jquery/tryit.asp?filename=tryjquery_sel_radio
Refer this,
Comment posted by layla l00
for the link you have shared, the radios have the same name therefore one gets unchecked when you check the other. i.e. you can only select one. in my case the radios are completely unrelated and each of them refers to something different. i am trying to be able to check or un-check any. maybe all. maybe none.
Comment posted by Sato Takeru
if you want select only one you should give the same names. and select several radio buttons you should give different names in my answer. but in the second condition it’s better to use checkbox.
Comment posted by GROVER.
@laylal00 Feel free to mark as having answered your question to help those that might come across the same issue in the future 🙂
Comment posted by layla l00
can i know what does e refer to? is it something i need to define on my browser or just a variable ? because e shows undefined for this solution