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> 展开
1个回答
展开全部
<!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;
}
SetSum();
}
function plusNum(commodityId,num){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
SetSum();
}
function SetSum()
{
document.getElementById("Sum").value=document.getElementById("num1").value*document.getElementById("jishu").value;
}
</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<input type="text" id="jishu" name="jishu" value="26" /></td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52<input type="text" id="Sum" name"sum" /></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;
}
SetSum();
}
function plusNum(commodityId,num){
if(document.getElementById("num"+commodityId).value<num){
document.getElementById("num"+commodityId).value = document.getElementById("num"+commodityId).value-0+1;
}
SetSum();
}
function SetSum()
{
document.getElementById("Sum").value=document.getElementById("num1").value*document.getElementById("jishu").value;
}
</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<input type="text" id="jishu" name="jishu" value="26" /></td>
<td align="center">=</td>
<td align="center" class="money"><font size="+2">¥52<input type="text" id="Sum" name"sum" /></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>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询