●请教●联动问题(提交信息不符合要求后,返回联动不起来)

datamoon 2005-04-26 11:38:28
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户账号充值</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
color: #0000FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="vbscript">
function show_cz_value()
if form1.cz_type.value="" or isnull(form1.cz_type.value) or IsEmpty(form1.cz_type.value) then
document.GetElementById("cz_value").style.display="none"
document.GetElementById("cz_value2").style.display="none"
document.GetElementById("tb_pc_count").style.display="none"
document.GetElementById("cz_value3").style.display="inline"
end if
if form1.cz_type.value<>"" and isnull(form1.cz_type.value)=false and IsEmpty(form1.cz_type.value)=false then
if form1.cz_type.value=1 then
document.GetElementById("cz_value").style.display="inline"
document.GetElementById("cz_value2").style.display="none"
document.GetElementById("cz_value3").style.display="none"
end if
if form1.cz_type.value=2 or form1.cz_type.value=3 then
document.GetElementById("cz_value").style.display="none"
document.GetElementById("cz_value2").style.display="inline"
document.GetElementById("cz_value3").style.display="none"
end if
if form1.cz_type.value=3 then
document.GetElementById("tb_pc_count").style.display="inline"
else
document.GetElementById("tb_pc_count").style.display="none"
end if
end if
end function
</script>
</head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<%
action_e=request.QueryString("action")
Select Case action_e
Case ""
Call main()
Case "cz_true"
Call cz_true()
end select
%>
<%
sub main()
session("cz")=true
%>
<form name="form1" method="post" action="<%=filename%>?action=cz_true">
<table width="500" height="210" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" height="25" align="right">用户类型:</td>
<td><select name="cz_type" class="select1" id="cz_type" onChange="vbscript:show_cz_value()">
<option selected>请选择</option>
<option value="1">个人计点</option>
<option value="2">个人包月</option>
<option value="3">网吧包月</option>
</select></td>
</tr>
<tr>
<td height="25" align="right">充值数量:</td>
<td><select name="cz_value" class="select1" id="cz_value" style="display:none">
<option selected>请选择点数</option>
<option value="100">100点</option>
<option value="300">300点</option>
<option value="600">600点</option>
</select>
<select name="cz_value2" class="select1" id="cz_value2" style="display:none">
<option selected>请选择月数</option>
<option value="1">1个月</option>
<option value="3">3个月</option>
<option value="6">6个月</option>
</select>
<select name="cz_value3" class="select1" id="cz_value3">
<option selected>请选择种类</option>
</select></td>
</tr>
<tr id="tb_pc_count" style="display:none">
<td height="25" align="right">网吧客户机数量:</td>
<td><input name="pc_count" type="text" class="input1" id="pc_count" size="6">
台</td>
</tr>
<tr id="tb_pc_count">
<td height="25" align="right">VIP用户:</td>
<td><input type="radio" name="cz_vip" value="true">
是 
<input type="radio" name="cz_vip" value="false">
否</td>
</tr>
<tr id="tb_pc_count">
<td height="25" align="right">用户账号:</td>
<td><input name="member_id" type="text" class="input1" id="member_id" size="15"></td>
</tr>
<tr id="tb_pc_count">
<td height="25" align="right">确认用户账号:</td>
<td><input name="re_member_id" type="text" class="input1" id="re_member_id" size="15"></td>
</tr>
<tr align="center" id="tb_pc_count">
<td height="40" colspan="2"><input name="submit" type="submit" class="button1" id="submit" value="确 定">
<input name="agent_money" type="hidden" id="agent_money" value="<%=agent_money%>">
<input name="agent_money2" type="hidden" id="agent_money2" value="<%=agent_money2%>"></td>
</tr>
</table></td>
</tr>
</table>
</form>
<%end sub%>
<%
sub cz_true()
if session("cz")<>true then
Response.Redirect ("cz.asp")
end if
if request.form("agent_money")="" or request.form("agent_money2")="" then
response.write"<script language=javascript>alert('关键参数值无法获取');history.back();</Script>"
response.end
end if
if myobj.chkmoney(request.form("agent_money"))=false or myobj.chkmoney(request.form("agent_money2"))=false then
response.write"<script language=javascript>alert('关键参数值的格式错误');history.back();</Script>"
response.end
end if
if request.form("cz_type")="" or isnull(request.form("cz_type")) then
response.write"<script language=javascript>alert('请选择用户类型');history.back();</Script>"
response.end
end if
...全文
105 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
auisoft 2005-04-28
  • 打赏
  • 举报
回复
这么多,看得了吗?

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧