Announcement

Collapse
No announcement yet.

Unselecting Radio Buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kent Multer
    replied
    As it happens, I have a project on my desk now that needed that:

    Code:
    var buttons = document.getElementsByName('YOUR_ELEMENT_NAME_HERE');
    
    for (var b = 0; b < buttons.length; b++) {
    buttons[b].checked = false;
    }

    Leave a comment:


  • lesliekirk
    started a topic Unselecting Radio Buttons

    Unselecting Radio Buttons

    I know that by default, HTML radio buttons cannot be unselected (no button selected) once a selection has been made. I'm wondering if anyone has added a javascript snippet to clear the selection and would be willing to share it?
Working...
X