asp html 提交表单前的判断、处理js
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
JQ = $;
var userId=0;
var JP=$;
function minusNum(commodityId){
if(document.getElementById("num"+commodityId).value>1){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-1;
}
}
function plusNum(commodityId,num){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
}
</script>
<table width="980" border="0" cellspacing="0" cellpadding="0" class="zhangshu_1">
<tr>
<th>项目</th>
<th width="125">手机号码</th>
<th width="88">数量</th>
<th width="60"></th>
<th width="150">价格</th>
<th width="60">=</th>
<th width="150">总价</th>
</tr>
<form name="more" action="linepay.asp" method="post" >
<tr>
<td style="line-height:22px"><a href="#">仅售26元!最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,节假通用仅售26元!最高价值70元的仙踪林单人套餐,节假通用</a></td>
<td><input name="" class="shouji" onfocus="if(this.value=='用于接收短讯验证码'){this.value='';this.style.color='#000000'}" onblur="if(this.value==''){this.value='用于接收短讯验证码';this.style.color='#aba4a4'}" value="用于接收短讯验证码"/></td>
<td align="center"><span><input name="" onclick="javascript:minusNum(1);" type="button" class="jian" /></span><input type="text" class="wen" name="commodityNumber" id="num1" value="2"><span><input name="" onclick="javascript:plusNum(1,30);" type="button" class="jia" /></span></td>
<td align="center">X</td>
<td align="center">¥26</td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52</font></td>
</tr>
<tr>
<td colspan="5"><font size="+1" color="#FF0000">应付总额</font></td>
<td align="center">=</td>
<td align="center"><font size="+2">¥26</font></td>
</tr>
</form>
</table>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
JQ = $;
var userId=0;
var JP=$;
function minusNum(commodityId){
if(document.getElementById("num"+commodityId).value>1){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-1;
}
}
function plusNum(commodityId,num){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
}
</script>
<table width="980" border="0" cellspacing="0" cellpadding="0" class="zhangshu_1">
<tr>
<th>项目</th>
<th width="125">手机号码</th>
<th width="88">数量</th>
<th width="60"></th>
<th width="150">价格</th>
<th width="60">=</th>
<th width="150">总价</th>
</tr>
<form name="more" action="linepay.asp" method="post" >
<tr>
<td style="line-height:22px"><a href="#">仅售26元!最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,节假通用仅售26元!最高价值70元的仙踪林单人套餐,节假通用</a></td>
<td><input name="" class="shouji" onfocus="if(this.value=='用于接收短讯验证码'){this.value='';this.style.color='#000000'}" onblur="if(this.value==''){this.value='用于接收短讯验证码';this.style.color='#aba4a4'}" value="用于接收短讯验证码"/></td>
<td align="center"><span><input name="" onclick="javascript:minusNum(1);" type="button" class="jian" /></span><input type="text" class="wen" name="commodityNumber" id="num1" value="2"><span><input name="" onclick="javascript:plusNum(1,30);" type="button" class="jia" /></span></td>
<td align="center">X</td>
<td align="center">¥26</td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52</font></td>
</tr>
<tr>
<td colspan="5"><font size="+1" color="#FF0000">应付总额</font></td>
<td align="center">=</td>
<td align="center"><font size="+2">¥26</font></td>
</tr>
</form>
</table>
</body>
</html> 展开
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
JQ = $;
var userId=0;
var JP=$;
function minusNum(commodityId,count){
if(document.getElementById("num"+commodityId).value>1){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-1;
}
SetSum(commodityId,count);
}
function plusNum(commodityId,num,count){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
SetSum(commodityId,count);
}
function SetSum(a,b)
{
document.getElementById("Sum"+a).value=document.getElementById("num"+a).value*document.getElementById("jishu"+a).value;
var ccc=0;
for(j=1;j<=b;j++)
{
ccc=ccc+parseInt(document.getElementById("Sum"+j).value);
}
document.getElementById("allSum").value=ccc;
}
</script>
<table width="980" border="0" cellspacing="0" cellpadding="0" class="zhangshu_1">
<tr>
<th>项目</th>
<th width="125">手机号码</th>
<th width="88">数量</th>
<th width="60"></th>
<th width="150">价格</th>
<th width="60">=</th>
<th width="150">总价</th>
</tr>
<form name="more" action="linepay.asp" method="post" >
<%
rRCount=2
for i=1 to rRCount%>
<tr>
<td style="line-height:22px"><a href="#">仅售26元!最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,节假通用仅售26元!最高价值70元的仙踪林单人套餐,节假通用</a></td>
<td><input name="" class="shouji" onfocus="if(this.value=='用于接收短讯验证码'){this.value='';this.style.color='#000000'}" onblur="if(this.value==''){this.value='用于接收短讯验证码';this.style.color='#aba4a4'}" value="用于接收短讯验证码"/></td>
<td align="center"><span><input name="" onclick="javascript:minusNum(<%=i%>,<%=rRCount%>);" type="button" class="jian" /></span><input type="text" class="wen" name="commodityNumber" id="num<%=i%>" value="2"><span><input name="" onclick="javascript:plusNum(<%=i%>,30,<%=rRCount%>);" type="button" class="jia" /></span></td>
<td align="center">X</td>
<td align="center">¥26<input type="text" id="jishu<%=i%>" name="jishu<%=i%>" value="26" /></td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52<input type="text" id="Sum<%=i%>" name"sum<%=i%>" value="<%=26*2%>" /></font></td>
</tr>
<%next%>
<tr>
<td colspan="5"><font size="+1" color="#FF0000">应付总额</font></td>
<td align="center">=</td>
<td align="center"><font size="+2">¥26<input type="text" id="allSum" name"allsum" /></font></td>
</tr>
</form>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
JQ = $;
var userId=0;
var JP=$;
function minusNum(commodityId,count){
if(document.getElementById("num"+commodityId).value>1){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-1;
}
SetSum(commodityId,count);
}
function plusNum(commodityId,num,count){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
SetSum(commodityId,count);
}
function SetSum(a,b)
{
document.getElementById("Sum"+a).value=document.getElementById("num"+a).value*document.getElementById("jishu"+a).value;
var ccc=0;
for(j=1;j<=b;j++)
{
ccc=ccc+parseInt(document.getElementById("Sum"+j).value);
}
document.getElementById("allSum").value=ccc;
}
</script>
<table width="980" border="0" cellspacing="0" cellpadding="0" class="zhangshu_1">
<tr>
<th>项目</th>
<th width="125">手机号码</th>
<th width="88">数量</th>
<th width="60"></th>
<th width="150">价格</th>
<th width="60">=</th>
<th width="150">总价</th>
</tr>
<form name="more" action="linepay.asp" method="post" >
<%
rRCount=2
for i=1 to rRCount%>
<tr>
<td style="line-height:22px"><a href="#">仅售26元!最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,最高价值70元的仙踪林单人套餐,节假通用仅售26元!最高价值70元的仙踪林单人套餐,节假通用</a></td>
<td><input name="" class="shouji" onfocus="if(this.value=='用于接收短讯验证码'){this.value='';this.style.color='#000000'}" onblur="if(this.value==''){this.value='用于接收短讯验证码';this.style.color='#aba4a4'}" value="用于接收短讯验证码"/></td>
<td align="center"><span><input name="" onclick="javascript:minusNum(<%=i%>,<%=rRCount%>);" type="button" class="jian" /></span><input type="text" class="wen" name="commodityNumber" id="num<%=i%>" value="2"><span><input name="" onclick="javascript:plusNum(<%=i%>,30,<%=rRCount%>);" type="button" class="jia" /></span></td>
<td align="center">X</td>
<td align="center">¥26<input type="text" id="jishu<%=i%>" name="jishu<%=i%>" value="26" /></td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52<input type="text" id="Sum<%=i%>" name"sum<%=i%>" value="<%=26*2%>" /></font></td>
</tr>
<%next%>
<tr>
<td colspan="5"><font size="+1" color="#FF0000">应付总额</font></td>
<td align="center">=</td>
<td align="center"><font size="+2">¥26<input type="text" id="allSum" name"allsum" /></font></td>
</tr>
</form>
</table>
</body>
</html>
追问
金额那里可以不可以不用 文本框呀
追答
可以啊..换label呀...
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询