如何判断v_amount值是否大于2或小于100
来源:百度知道 编辑:UC知道 时间:2024/08/21 00:34:49
<form method="POST" action="Pay.asp?act=pay2">
<tr>
<td width="12%" colspan=3 align="Center">会员帐号:</td>
<td width="15%" colspan=3 align="Center"><input type="text" size="15" name="v_rcvname"
value="<%=Ylmv_Com_Name%>"></td>
</tr>
<tr>
<td width="12%" colspan=3 align="Center">充值金额:</td>
<td width="15%" colspan=3 align="Center"><input type="text" size="15" name="v_amount"
value="50"></td>
</tr>
</table>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5"
width="27%" align="Center" style=&qu
<tr>
<td width="12%" colspan=3 align="Center">会员帐号:</td>
<td width="15%" colspan=3 align="Center"><input type="text" size="15" name="v_rcvname"
value="<%=Ylmv_Com_Name%>"></td>
</tr>
<tr>
<td width="12%" colspan=3 align="Center">充值金额:</td>
<td width="15%" colspan=3 align="Center"><input type="text" size="15" name="v_amount"
value="50"></td>
</tr>
</table>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5"
width="27%" align="Center" style=&qu
这个在客户端用Javascript判断就行了,帮你改了一下:
<script language="JavaScript">
<!--
function CompareInput(){
var iInput = document.getElementById("v_amout").value;
if (iInput>=2&&iInput<=100)
{
document.form1.submit();
}
else
{
alert("您输入的充值金额必须>1元,小于等于100元");
}
}
//-->
</script>
<form name="form1" method="POST" action="Pay.asp?act=pay2">
<tr>
<td width="12%" colspan=3 align="Center">会员帐号:</td>
<td width="15%" colspan=3 align="Center"><input type="text" size="15" name="v_rcvname"
value="<%=Ylmv_Com_Name%>"></td>
</tr>
<tr>
<td width="12%" colspan=3 align="Center">充