JS代码:
var Input2=false;
for (i=0;i<document.form1.RadioButtonList2.length;i++
{
    Input2
=Input2||document.form1.RadioButtonList2[i].checked;

if (Input2==false)
{
    alert(
'请选择问题2');
    
return false;
}

HTML代码:
<input id='RadioButtonList2_0' type='radio' name='RadioButtonList2' value='0' /><label for='RadioButtonList2_0'>a111</label><br />
<input id='RadioButtonList2_1' type='radio' name='RadioButtonList2' value='1' /><label for='RadioButtonList2_1'>a222</label><br />
<input id='RadioButtonList2_2' type='radio' name='RadioButtonList2' value='2' /><label for='RadioButtonList2_2'>a333</label><br />

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-30
  • 2021-10-25
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案