谁能帮我写个文字+图片分页显示代码。谢谢

来源:百度知道 编辑:UC知道 时间:2024/05/21 04:20:26
文字和图地址在数据库里都是放在一起的

<!--#include file="../inc/conn.asp"-->
<!-- 本示例演示一个通用的记录集分栏显示,因为有的时候显示产品等要每行显示若干个,而不是每行显示一个。如有有这种分栏显示的表格,直接把下面的代码套进去就行了,本示例是每行显示2个记录,再最下面还显示了分页栏。 -->
<%
Dim fileName,postion
fileName = Request.ServerVariables("script_name")
postion = InstrRev(fileName,"/")+1
fileName = Mid(fileName,postion)
set rs=server.CreateObject("adodb.recordset")
sql="select * from chanpin order by chan_id desc"
rs.open sql,conn,1,1
%>
<!-- 产品展示表格 --><style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
}
body {
background-color: #999999;
}
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>