下面这这个页面能竖着显示图片及名称,能否让它横着显示3张,再换行,共显示4行,再分页;代码怎么改?
如果再想显示共有图片数,共有多少页,本页是第几页,代码怎么写?
<%OPTION EXPLICIT%><html>
<head>
<style type="text/css">
<!--
.p9{ font-size: 9pt; font-family: 宋体 }
td {font-size: 9pt}
.tx {height: 16px; width: 30px; border-color: black black #000000; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #eeeeee; color: #0000FF}
.tx2 {height: 16px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; color: #0000FF; border-left-color:#000000; border-right-color:#000000; border-top-color:#000000; border-bottom-color:#000000}
.bt {border-left:1px solid #C0C0C0; border-top:1px solid #C0C0C0; font-size: 9pt; border-right-width: 1; border-bottom-width: 1; height: 16px; width: 80px; background-color: #EEEEEE; cursor: hand; border-right-style:solid; border-bottom-style:solid}
.tx1 { width: 400 ;height: 20px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>图片展示</title>
</head>
<body bgcolor="#ffffff" class="p9" onload="addfile()">
<table width="140" height="130" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="p9" style="border-collapse: collapse">
<%
dim conn,rs,i,ServerPath
conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("dbase.mdb")
set rs=Server.CreateObject("adodb.recordset")
rs.Open "select * from FileInfo",conn,1,3
if not (rs.BOF and rs.EOF) then
ServerPath=GetFilePath(Request.ServerVariables("HTTP_REFERER"),"/")'取得在网站上的位置
for i=1 to rs.RecordCount
%>
<tr>
<td width="140" height="102" align="center" ><A HREF="<%=serverpath&"readdbfile.asp?filename="&rs("FileName")%>" target="_blank"><img src="<%=serverpath&"readdbfile.asp?filename="&rs("FileName")%>" width="130" height="90" border="0" align="middle"></A></td>
</tr>
<tr>
<td height="25" align="center" ><A HREF="<%=serverpath&"readdbfile.asp?filename="&rs("FileName")%>"><%=rs("FileName")%></A></td>
</tr>
<%
rs.MoveNext
next
%>
<%
rs.Close
set rs=nothing
end if
%>
</table>
</body>
</html>
<%
function GetFilePath(FullPath,str)
If FullPath <> "" Then
GetFilePath = left(FullPath,InStrRev(FullPath, str))
Else
GetFilePath = ""
End If
End function
%>
asp图片只能竖着排列:
如:
http://www.sqwy.cn/test/upfile/14pic.asp
能否让它横着显示3张,再换行,共显示4行,再分页;代码怎么改?