How To Deselect A Radio Button

Sometimes radio buttons can be quite frustrating as a user when you need to deselect having answered a question.

Here’s a quick way to temporarily allow a page to deselect radio buttons by pressing Ctrl + Click

  1. Navigate to any page that has radiobuttons. Here’s an example of one:
  2. Click F12 to open up the developer tools
  3. Navigate to the Console Pane
  4. Copy and paste in the following code into the editor:

    document.addEventListener('click', function(e){
     if (e.ctrlKey == true && 
         e.target.tagName == 'INPUT' && 
         e.target.type == "radio" && 
         e.target.checked == true) {
         e.target.checked = false;
     }
    });
  5. Click Run Script (or hit Enter)
  6. Now, to deselect a radio button just go back to the page and hold down Ctrl and click with your mouse.

Instructions

This screenshot should match your current browser, but if it doesn’t - here’s an album of screenshots for different browsers

Note: Of course, by the time you’re opening up the developer tools, you can just edit the HTML directly, but this is a little more reusable.

3 comments:

  1. The two way radios are generally of two types. These are Family Radio service, FRS, and General Mobile Radio service, GMRS. walkie talkie set

    ReplyDelete
  2. I truly awed after read this in view of some quality work and instructive considerations . I just wanna express profound gratitude for the essayist and want you to enjoy all that life has to offer for coming!. running snail radio manual

    ReplyDelete