<script>function check(){var flag = false;if(form1.info_type != null){ var msglen=form1.info_type.length; for(i=0;i<msglen;i++){ if(form1.info_type[i].checked==true){ flag = true; } }}if (flag == false){ alert("对不起,请选择") return false;}}</script><form id="form1" name="form1" method="post" action="" onsubmit="return check();"><td height=30>A <input type="radio" name="info_type" value="A"> B <input type="radio" name="info_type" value="B"> C <input type="radio" name="info_type" value="C"> <label> <input type="submit" name="Submit" value="提交" /> </label></td></form>
大家自己看下把 很好理解的 希望对大家有用
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
,
<script>function check(){var flag = false;if(form1.info_type != null){ var msglen=form1.info_type.length; for(i=0;i<msglen;i++){ if(form1.info_type[i].checked==true){ flag = true; } }}if (flag == false){ alert("对不起,请选择") return false;}}</script><form id="form1" name="form1" method="post" action="" onsubmit="return check();"><td height=30>A <input type="radio" name="info_type" value="A"> B <input type="radio" name="info_type" value="B"> C <input type="radio" name="info_type" value="C"> <label> <input type="submit" name="Submit" value="提交" /> </label></td></form>
大家自己看下把 很好理解的 希望对大家有用