Forum Discussion

  • Hi ManjunathKrishn you can access all of the individual Radio Button or Checkbox elements and their "selected" state using the following script. I'm not sure how you are looking to access and use the values, therefore this is a basic indication of how the values are accessed.

    // Returns an array of all Radio Button and/or Checkbox elements
    const inputs = document.querySelectorAll('input[type=radio],input[type=checkbox]');
    // To access the individual "selected" state, you can use the "checked" property.
    // Returns true or false.
    let input01status = inputs[0].checked 
    console.log(input01status);