js判断单选按钮

来源:百度知道 编辑:UC知道 时间:2024/06/28 17:20:10
<input type="radio" value="<%=rs("titlename")%>" name="payment">

<SCRIPT language=javascript>
function Onsubmit()
{

if (document.form1.payment.checked==false)
{
alert("请选择付款方式!");
return false;
}
}
</SCRIPT>
<form name=form1 onSubmit="return Onsubmit()" action=pay.asp method=post>
怎么试来试去还是没有效果??
是包了的
楼下全都试了还是一样

onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!onsubmit是全小写!
____________________________________________
onSubmit="return Onsubmit()"
改为onSubmit="return Onsubmit();"
action method后面都加引号,
function Onsubmit()
{

if (document.form1.payment.checked==false)
{
alert("请选择付款方式!");
return false;
}
else return true;<----加一句
}
试试呢楼主

<form name=form1 onSubmit="return Onsubmit()" action=pay.asp method=post>
<input type="radio" value="aaaa" name="payment">
<input type="submit" value="aaa">
</form>

<SCRIPT language=j