<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<form name="form1" method="post" action="" οnsubmit="return postform(this)">
<td align="center"><font color="#CC0000"><b> </b></font>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> </tr>
<tr>
<td align="center" class="font9"><input type="radio" name="infoclass" value="供货" />
供货
<input type="radio" name="infoclass" value="求购" id="radio" />
求购
<input type="radio" name="infoclass" value="活动" id="radio2" />
活动
<input type="radio" name="infoclass" value="转让" id="radio3" />
转让
<input type="submit" name="Submit" value=" 提交 "></td>
</tr>
</table></td>
</form>
</tr>
</table>
<script type="text/javascript">
function postform(obj){
var obj2=document.getElementsByName("infoclass");
for(var i=0;i<obj2.length;i++){
if(obj2[i].checked==true){
temp=1;
break;
}else{
temp=0;
}
}
if(temp==0){alert("请选择");return false;}
}
</script>
判断一组单选按钮是否有被选中的
最新推荐文章于 2021-06-16 06:15:05 发布