ASP 跳转不到按钮要连接的页面 请高手指教
<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%><!--#includefile=DataBase/conn.asp--><!--#inclu...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<!--#include file=purview.asp-->
<%call users
if request("post")<>"" then
set rss=server.CreateObject("adodb.recordset")
sqls="select * from kh_pingfen "
rss.open sqls,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
.style3 {color: #FFFFFF}
.STYLE4 {font-size: 14px}
.STYLE5 {font-size: 16px}
.style11 {color: #FF0000}
-->
</style></head>
<body>
<table width="100%" border="0" >
<tr>
<td valign="top"> <fieldset class="fiedset">
<legend></legend>
<form name="form1" method="post" action="">
<table width="90%" height="27" border="0" align="center" cellspacing="0" class="table">
<tr align="center">
<td width="27%" height="27"><input name="post" type="hidden" id="post" value="true">选择时间:</td>
<td width="19%">
<select name="ptime" id="ptime">
<option value="201010">2010/10</option>
<option value="201011">2010/11</option>
<option value="201012">2010/12</option>
<option value="201101">2011/01</option>
<option value="201102">2011/02</option>
<option value="201103">2011/03</option>
<option value="201104">2011/04</option>
<option value="201105">2011/05</option>
</select></td>
<td width="14%" ><input type="submit" name="Submit" value="生成本月数据"onClick="location.href='tongji_sc.asp?ptime=<%=request("ptime")%>'"></td>
<td width="15%"><span class="style11"></span></td>
</tr>
</table>
</form>
</form>
<p><br>
</p>
</fieldset></td>
</tr>
</table>
</body>
</html>
点击没反映 展开
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<!--#include file=purview.asp-->
<%call users
if request("post")<>"" then
set rss=server.CreateObject("adodb.recordset")
sqls="select * from kh_pingfen "
rss.open sqls,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
.style3 {color: #FFFFFF}
.STYLE4 {font-size: 14px}
.STYLE5 {font-size: 16px}
.style11 {color: #FF0000}
-->
</style></head>
<body>
<table width="100%" border="0" >
<tr>
<td valign="top"> <fieldset class="fiedset">
<legend></legend>
<form name="form1" method="post" action="">
<table width="90%" height="27" border="0" align="center" cellspacing="0" class="table">
<tr align="center">
<td width="27%" height="27"><input name="post" type="hidden" id="post" value="true">选择时间:</td>
<td width="19%">
<select name="ptime" id="ptime">
<option value="201010">2010/10</option>
<option value="201011">2010/11</option>
<option value="201012">2010/12</option>
<option value="201101">2011/01</option>
<option value="201102">2011/02</option>
<option value="201103">2011/03</option>
<option value="201104">2011/04</option>
<option value="201105">2011/05</option>
</select></td>
<td width="14%" ><input type="submit" name="Submit" value="生成本月数据"onClick="location.href='tongji_sc.asp?ptime=<%=request("ptime")%>'"></td>
<td width="15%"><span class="style11"></span></td>
</tr>
</table>
</form>
</form>
<p><br>
</p>
</fieldset></td>
</tr>
</table>
</body>
</html>
点击没反映 展开
4个回答
展开全部
我从你的代码中都看不到有需要用到数据库的数据,干嘛要链接数据库呢?
我可以帮你改代码,这样你就可以从表单和questring中获得同样是“ptime”的两个对象
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<!--#include file=purview.asp-->
<%call users
if request("post")<>"" then
set rss=server.CreateObject("adodb.recordset")
sqls="select * from kh_pingfen "
rss.open sqls,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
.style3 {color: #FFFFFF}
.STYLE4 {font-size: 14px}
.STYLE5 {font-size: 16px}
.style11 {color: #FF0000}
-->
</style></head>
<body>
<table width="100%" border="0" >
<tr>
<td valign="top"> <fieldset class="fiedset">
<legend></legend>
<form name="form1" method="post" action="tongji_sc.asp?ptime=<%=request("ptime")%>">
<table width="90%" height="27" border="0" align="center" cellspacing="0" class="table">
<tr align="center">
<td width="27%" height="27"><input name="post" type="hidden" id="post" value="true">选择时间:</td>
<td width="19%">
<select name="ptime" id="ptime">
<option value="201010">2010/10</option>
<option value="201011">2010/11</option>
<option value="201012">2010/12</option>
<option value="201101">2011/01</option>
<option value="201102">2011/02</option>
<option value="201103">2011/03</option>
<option value="201104">2011/04</option>
<option value="201105">2011/05</option>
</select></td>
<td width="14%" ><input type="submit" name="Submit" value="生成本月数据"></td>
<td width="15%"><span class="style11"></span></td>
</tr>
</table>
</form>
</form>
<p><br>
</p>
</fieldset></td>
</tr>
</table>
</body>
</html>
我可以帮你改代码,这样你就可以从表单和questring中获得同样是“ptime”的两个对象
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<!--#include file=purview.asp-->
<%call users
if request("post")<>"" then
set rss=server.CreateObject("adodb.recordset")
sqls="select * from kh_pingfen "
rss.open sqls,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
.style3 {color: #FFFFFF}
.STYLE4 {font-size: 14px}
.STYLE5 {font-size: 16px}
.style11 {color: #FF0000}
-->
</style></head>
<body>
<table width="100%" border="0" >
<tr>
<td valign="top"> <fieldset class="fiedset">
<legend></legend>
<form name="form1" method="post" action="tongji_sc.asp?ptime=<%=request("ptime")%>">
<table width="90%" height="27" border="0" align="center" cellspacing="0" class="table">
<tr align="center">
<td width="27%" height="27"><input name="post" type="hidden" id="post" value="true">选择时间:</td>
<td width="19%">
<select name="ptime" id="ptime">
<option value="201010">2010/10</option>
<option value="201011">2010/11</option>
<option value="201012">2010/12</option>
<option value="201101">2011/01</option>
<option value="201102">2011/02</option>
<option value="201103">2011/03</option>
<option value="201104">2011/04</option>
<option value="201105">2011/05</option>
</select></td>
<td width="14%" ><input type="submit" name="Submit" value="生成本月数据"></td>
<td width="15%"><span class="style11"></span></td>
</tr>
</table>
</form>
</form>
<p><br>
</p>
</fieldset></td>
</tr>
</table>
</body>
</html>
展开全部
<input type="submit" name="Submit" value="生成本月数据" onClick="location.href='tongji_sc.asp?ptime=<%=request("ptime")%>'">
你这个按钮,是submit类型,点击的时候,首先是提交表单,然后再触发跳转事件嘛,但提交表单后,服务器返回把你这个事件给盖了啊.
你把type="submit" 改为 type="botton" (按钮类型),肯定可以了
你这个按钮,是submit类型,点击的时候,首先是提交表单,然后再触发跳转事件嘛,但提交表单后,服务器返回把你这个事件给盖了啊.
你把type="submit" 改为 type="botton" (按钮类型),肯定可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
多了个</FORM>标签,删掉试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询