这下面的程序是我写的分页,可是不知为什么ie执行不了,请问各位高手给指点一下错误!
各位我知程序长,请大家耐心看看,给我说说错误,我很急,谢谢帮忙了,另外问一下,分页是不是还要给数据库里加什么栏位吗?谢谢!
<% @language="vbscript" %>
<!-- #INCLUDE FILE="conn.asp" -->
<%
'response.buffer=true
'Response.Expires=0
'sql="select * from news where news_native='"&request("native")&"' order by news_date"
'Set rs = Server.CreateObject("ADODB.Recordset")
'rs.open sql,conn,3
%>
<%
response.buffer=true
Response.Expires=0
sql="select * from news where news_native='"&request("native")&"' order by news_date"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1
page=1
rs.PageSize = 20
if Not IsEmpty(Request("Page")) then
Page = CInt(Request("Page"))
if Page > rst.PageCount then
rst.AbsolutePage = rst.PageCount
elseif Page <= 0 then
Page = 1
else
rs.AbsolutePage = Page
end if
End if
intCurPage = rsj.AbsolutePage
%>
<%
For i = 1 to rs.PageSize
if rst.eOF then
Exit For
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>新闻条目</title>
<style TYPE="text/css">
<!--
.p9 { font-family: "宋体"; font-size: 9pt; font-weight: normal}
.p9e { font-family: "arial"; font-size: 9pt; font-weight: normal}
.p92 { font-size: 9pt; line-height: 15pt}
a:link { text-decoration: none}
a:visited { text-decoration: none}
a:hover { color: #3880DE}
.p12 { font-family: "宋体"; font-size: 9pt; line-height: 18pt; text-decoration: underline}
.p11 { font-size: 11pt}
.p11-150 { font-size: 11pt; line-height: 150%}
.p9-150 { font-size: 9pt; line-height: 150%; text-decoration: none}
-->
</style>
</head>
<body bgColor="#ffffff" topMargin="0" link="#2F4F4F" vlink="#2F4F4F" alink="#2F4F4F" text="#808080" leftmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<center>
<table width=778 border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <img src="images/top_01.jpg" width=78 height=84></td>
<td> <img src="images/top_02.jpg" width=78 height=84></td>
<td> <img src="images/top_03.jpg" width=77 height=84></td>
<td> <img src="images/top_04.jpg" width=78 height=84></td>
<td> <img src="images/top_05.jpg" width=78 height=84></td>
<td> <img src="images/top_06.jpg" width=78 height=84></td>
<td> <img src="images/top_07.jpg" width=78 height=84></td>
<td> <img src="images/top_08.jpg" width=77 height=84></td>
<td> <img src="images/top_09.jpg" width=78 height=84></td>
<td> <img src="images/top_10.jpg" width=78 height=84></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bg.jpg" width="230" rowspan="2"> </td>
<td> </td>
</tr>
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="p9-150"> <font color=#FF9933> <b> </b></font>
<div align="left"><font color="#000000"><span class=txt> </span><br>
<%
if not rs.eof then
rs.movelast
do while not rs.Bof
是头条新闻吗?
if trim(rs("news_native"))=request("native") then
'判断是否news_comment中提供了新闻内容
%>
<img src="images/pot.gif" width="17" height="13"> <font
class="p9-200"><%=rs("news_date")%></font> <a
href="disp.asp?recno=<%=rs("news_no")%>" target="news"><%=rs("news_title")%></a>
<br>
<%
' end if
'rs.moveprevious
'loop
'end if
%>
<%rs.movenxet
next
%>
<%if page<>1 then%><a Href="nesw2.asp?Page=<% = 1%>">首页</a> <a Href="nesw2.asp?ToPage=<% =ToPage -1 %>">上一页</a> %><%end if %><%if page<>rs.pagecount then %><a Href="nesw2.asp?ToPage=<% =Page + 1%>">下一页</a> <a Href="nesw2.asp?ToPage=<% = rs.PageCount%>">尾页</a> <% end if %>
</font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="p9">CopyRight © 2000 ChinaGoldCoin.net <span class="p9"><a href="mailto:webmaster@chinagoldcoin.net">Email:webmaster@chinagoldcoin.net</a></span></td>
</tr>
</table>
</center>
</body>
</html>
<script language="JavaScript">
function news()
{
window.open("temp.htm","news","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=2,left=2,width=500,height=500")
//window.open("1.htm","news","width=470,height=500");
}
</script>
<%
rst.close
Set rs = Nothing
conn.close
set conn=nothing
%>