日期:2014-05-17 浏览次数:20450 次
<form name="auth_form" action="auth.php"> <input name="gender" type="radio" value="<?php echo $gender_id; ?>"><?php echo $gender; ?> </form>
<form name="auth_form" action="auth.php" method="post" onsubmit="return aa()"> <input name="payment" type="radio" value="123"/> <input name="sea" type="radio" value="456"/> } <br /> <input type="submit" value="submit" /> </form> <script> function aa(){ var radioInput=document.getElementsByTagName("form")[0].getElementsByTagName("input"); if(radioInput[0].checked==false || radioInput[1].checked==false){ alert("请选择。。"); return false; } } </script>
------解决方案--------------------