<!--#Include File="inc/Check_Sql.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!-- #include file="inc/config.asp" -->
<!--#include file="inc/Function.asp"-->
<%owen=request("id")
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
title=rsnews("title")
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
%>
<!-- #include file="top.asp" -->
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="935" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="250" height="297" valign="top" bgcolor="#FFFFFF" class="right"><!--#include file="LEFT3.asp" --></td>
<td valign="top" bgcolor="#FFFFFF" class="right"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="left"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7%" align="right"><img src="im/lm_l.gif" width="43" height="41"></td>
<td width="13%"><img src="im/lm_17.gif" width="90" height="41"></td>
<td width="80%" align="right" class="t"> <img src="ima/ico2.gif" width="8" height="8" /> 你当前的位置:<a href="index.asp">首页</a> >> 相关内容 </td>
</tr>
</table></td>
</tr>
<tr>
<td height="171" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20" height="37"> </td>
<td width="642" align="center" valign="middle"><strong><%= rsnews("title") %></strong></td>
<td width="23"> </td>
</tr>
<tr>
<td height="272"> </td>
<td valign="top"><%=rsnews("content") %>
<hr size="1"></td>
<td> </td>
</tr>
<%
end if
rsnews.close
set rsnews=nothing
%>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<!-- #include file="end.asp" -->
这段代码怎么加长文章分页代码?
答案:2 悬赏:30 手机版
解决时间 2021-04-11 23:25
- 提问者网友:刺鸟
- 2021-04-11 00:51
最佳答案
- 五星知识达人网友:三千妖杀
- 2021-04-11 01:37
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20" height="37"> </td>
<td width="642" align="center" valign="middle"><strong><%= rsnews("title") %></strong></td>
<td width="23"> </td>
</tr>
<tr>
<td height="272"> </td>
<td valign="top"><%=rsnews("content") %>
<hr size="1"></td>
<td> </td>
</tr>
<%
rsnews.movenext
loop
%>
<%
end if
rsnews.close
set rsnews=nothing
%>
</table></td>
</tr>
</table> </td>
</tr>
</table>
记录总数:<%=rsnews.RecordCount%> 条 当前页:<%=PageNo%>/<%=rsnews.Pagecount%> 页大小:<%=rsnews.Pagesize%>
<%
If PageNo<>1 then
Response.write "<a href=?PageNo=1>首页</a> "
Response.write "<a href=?PageNo="& Cstr(PageNo-1) & ">上页</a> "
Else
Response.Write "首页 "
Response.write "上页 "
End If
<tr>
<td width="20" height="37"> </td>
<td width="642" align="center" valign="middle"><strong><%= rsnews("title") %></strong></td>
<td width="23"> </td>
</tr>
<tr>
<td height="272"> </td>
<td valign="top"><%=rsnews("content") %>
<hr size="1"></td>
<td> </td>
</tr>
<%
rsnews.movenext
loop
%>
<%
end if
rsnews.close
set rsnews=nothing
%>
</table></td>
</tr>
</table> </td>
</tr>
</table>
记录总数:<%=rsnews.RecordCount%> 条 当前页:<%=PageNo%>/<%=rsnews.Pagecount%> 页大小:<%=rsnews.Pagesize%>
<%
If PageNo<>1 then
Response.write "<a href=?PageNo=1>首页</a> "
Response.write "<a href=?PageNo="& Cstr(PageNo-1) & ">上页</a> "
Else
Response.Write "首页 "
Response.write "上页 "
End If
If PageNo<>rs.PageCount then
Response.write "<a href=?PageNo="& Cstr(PageNo+1) & ">下页</a> "
Response.write "<a href=?PageNo="& Cstr(TotalPages) & ">末页</a> "
Else
Response.Write "下页 "
Response.write "末页 "
End If
%>
全部回答
- 1楼网友:鸠书
- 2021-04-11 03:15
你没有写分页代码啊?
不明白加长什么
要是想分页的话 写个分页好了
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯