Answers for "check radio button javascript with same id"

3

check if one of the radio button is checked

if ($('input[name='+ radioName +']:checked').length) {
           // at least one of the radio buttons was checked
           return true; // allow whatever action would normally happen to continue
      }
      else {
           // no radio button was checked
           return false; // stop whatever action would normally happen
      }
Posted by: Guest on January-18-2021
0

can se have same id for radio button in html

<ul class="tabs">
    <li>
    <input type="radio" name="tabs" id="som" value="0">
    <label for="som">Venta</label>
</li>
<li>
    <input type="radio" name="tabs" id="som" value="1">
    <label for="som">Aliquera</label>
</li>
Posted by: Guest on April-29-2022

Code answers related to "check radio button javascript with same id"

Code answers related to "Javascript"

Browse Popular Code Answers by Language