📌  相关文章
📜  检查单选按钮是否被选中 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:25.405000             🧑  作者: Mango

代码示例4
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
      }