| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 504 人关注过本帖
标题:[求助]为什么我的跳转不好使
取消只看楼主 加入收藏
tulipdwh
Rank: 1
等 级:新手上路
帖 子:79
专家分:0
注 册:2006-10-18
收藏
 问题点数:0 回复次数:0 
[求助]为什么我的跳转不好使

<!--#include file="conn.asp"-->
<%
page1 = request.QueryString("page")
id1 = request.QueryString("id")

if not isempty(request.QueryString("page")) then
dpage = cint(request.QueryString("page"))
else
dpage = 1
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from classII where id=" & request("id") ,conn,1,1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from product where id=" & request("id") ,conn,1,1
dim dl
dl=rs("classname")
rs.close
rs.open "select * from Product where classII =" & request("id"),conn,1,1
%>
<%
if rs.eof and rs.bof then
page=1
maxpage=1
else
rs.pagesize=3
icount=rs.recordcount
ipagesize=rs.pagesize
maxpage=rs.pagecount
page=request("page")

if not isnumeric(page) or page="" then
page=1
else
page=cint(page)
end if

if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if

rs.absolutepage=page

if page=maxpage then
x=iconut-(maxpage-1)*ipagesize
else
x=ipagesize
end if

x=x-4

if page<>1 then
for i=0 to x
rs.movenext
next
end if
end if
%>
<!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"><!-- InstanceBegin template="/Templates/moban.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>营口联想-----联想专卖</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="css.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
</head>

<body>
<table width="1002" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="img/0001.gif" width="1002" height="209" /></td>
</tr>
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1002" height="60">
<param name="movie" value="tou.swf" />
<param name="quality" value="high" />
<embed src="tou.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1002" height="60"></embed>
</object></td>
</tr>
<tr>
<td height="113" valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td width="2%"><img src="img/左.gif" width="16" height="300" /></td>
<td width="19%" valign="top"><form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="img/1.0" width="194" height="34" /></td>
</tr>
<tr>
<td><img src="img/2.2" width="192" height="52" /></td>
</tr>
<tr>
<td><img src="img/3.1" width="192" height="40" /></td>
</tr>
<tr>
<td><img src="img/4.1" width="192" height="56" /></td>
</tr>
<tr>
<td><img src="img/5.1" width="192" height="43" /></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/6.1" width="192" height="50" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/7.1" width="192" height="40" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/8.1" width="192" height="41" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/9.1" width="192" height="39" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/10.2" width="192" height="38" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/11.2" width="192" height="37" border="0" /></a></td>
</tr>
<tr>
<td><a href="lxzm.asp"><img src="img/12.2" width="192" height="53" border="0" /></a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</form>
</td>
<td width="76%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="24" background="img/13.2" class="STYLE18">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <%=dl%></td>
</tr>
<tr>
<td height="163">
<table width="100%" height="166" border="1" cellpadding="0" cellspacing="0" bordercolor="#F0F0EF" frame="rhs" rules="none">
<%
dim x
x=0
do while not rs.eof
%> <tr>
<td height="167" valign="top" background="img/14.3"><table width="100%" height="166" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="2%" rowspan="2"> </td>
<td width="28%" rowspan="2"><div align="center"><img src="<%=rs("tupian")%>">&nbsp;</div></td>
<td height="18" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%">&nbsp;</td>
<td width="95%" class="aaa"><a href="http://appserver.lenovo.com.cn/Product/Channel/product_catalog.asp?catalogid=653" class="STYLE4"><%=rs("productname")%></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="140" valign="top" class="aaa"><table width="100%" height="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="8" colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="3%" height="99" valign="top">&nbsp;</td>
<td width="97%" valign="top"><%=rs("productinfo")%></td>
</tr>
<tr>
<td height="14" valign="top">&nbsp;</td>
<td valign="bottom"><div align="right"><span class="STYLE18"> </span><a href="lxzm2.asp?id=<%=rs("id")%>">详细信息&gt;&gt;</a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<%
x=x+1
if x>2 then exit do
rs.movenext
loop%>
</table></td>
</tr>

<tr>
<td height="18" valign="top" class="aaa">
<div align="right">

<%
response.Write"共"&rs.recordcount&"条记录"
%>
共<%=maxpage%>页 第<%=page%>页
<%
if page=1 then
response.Write"[上一页]"
else
%>
[<a href="?page=<%=page-1%>&id=<%=id1%>">上一页</a>]
<%
end if
if page=rs.pagecount or page=0 then
response.Write"[下一页]"
else
%>
[<a href="lxzm1.asp?page=<%=page+1%>&id=<%=id1%>"> 下一页</a>]
<%
end if
if page>1 then
%>
[<a href=lxzm1.asp?pag=1&id=<%=id1%>>首页</a>]
<%
else
response.Write"[首页]"
end if
if page<rs.pagecount then
%>
[<a href=lxzm1.asp?page=<%=int(rs.pagecount)%>&id=<%=id1%>>尾页</a>]
<%
else
response.Write"[尾页]"
end if
%>
转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.Pagecount
if i = page then%>
<option value="lxzm1.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="lxzm1.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页


</div></td>
</tr>
</table>
</td>
<td width="3%" valign="top"><img src="img/右.gif" width="26" height="300" /></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td><img src="img/下1.gif" width="1002" height="28" /><br><img src="img/下2.gif" /><br><img src="img/下3.gif" /></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

[此贴子已经被islet于2006-11-10 11:25:14编辑过]

搜索更多相关主题的帖子: request include where 
2006-11-10 11:19
快速回复:[求助]为什么我的跳转不好使
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028675 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved