asp代码,图片显示要求分页6个图片一页
<tablewidth="100%"border="0"cellspacing="5"cellpadding="0"><tr><td><divalign="center"...
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td><div align="center"><div align="left" style="width:600px; border-bottom:1px solid #dedede;"><img src="listimg/M.jpg" width="143" height="22" /><span style="margin-left:180px;color:#999999;">您的位置:首页
> <%=myname%> > <%=keytitle%></span></div></div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="106%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
sql="select * from news where pid="&keyno&" and cnflag=1 order by xuhao"
rs.Open sql,cn,1,1
do while not rs.EOF
%>
<tr>
<%
for i=1 to 2
if not rs.EOF then
url="#"" onclick=""window.open('pop_show.asp?fnamee=2&keyno="&rs("id")&"','','width=100,height=100,scrollbars=none');return false;"
%>
<td width="36%" align="center">
<TABLE width=240
height=184 border=0 align="center" cellPadding=0 cellSpacing=0
style="BORDER-RIGHT: #ff5b06 1px solid; BORDER-TOP: #ff5b06 1px solid; FILTER: filter : progid:DXImageTransform.Microsoft.DropShadow(color=#ffd7be,offX=1,offY=1,positives=true); BORDER-LEFT: #ff5b06 1px solid; BORDER-BOTTOM: #ff5b06 1px solid">
<TBODY>
<TR>
<TD align=middle bgColor=#ffffff width="150" height="115">
<%if rs("picflag2")=1 then%><!--a <%if rs("picflag")=1 then%>href="<%=url%>"<%end if%>--><img src="upload/<%=rs("picfilename2")%>" width="240" height="184" border="0"></a>
<%else%>
<font color=666666>暂无图片</font>
<%end if%></TD>
</TR>
</TBODY>
</TABLE>
<table cellSpacing=0 cellPadding=0 width=100% border=0>
<tr>
<td height="40" align="center"><!--a <%if rs("picflag")=1 then%>href="<%=url%>"<%end if%>--><%=rs("title")%></a>
</td>
</tr>
</table>
</td>
<%
rs.MoveNext
else
%>
<td width="64%" align="center"> </td>
<%
end if
next
%>
</tr>
<%
loop
rs.Close
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<!--table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><img src="images/pro/point_l.gif" width="14" height="14" align="absmiddle">
<a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <img src="images/pro/point_r.gif" width="14" height="14" align="absmiddle"></td>
</tr>
</table--></td>
</tr>
</table> 展开
<tr>
<td><div align="center"><div align="left" style="width:600px; border-bottom:1px solid #dedede;"><img src="listimg/M.jpg" width="143" height="22" /><span style="margin-left:180px;color:#999999;">您的位置:首页
> <%=myname%> > <%=keytitle%></span></div></div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="106%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
sql="select * from news where pid="&keyno&" and cnflag=1 order by xuhao"
rs.Open sql,cn,1,1
do while not rs.EOF
%>
<tr>
<%
for i=1 to 2
if not rs.EOF then
url="#"" onclick=""window.open('pop_show.asp?fnamee=2&keyno="&rs("id")&"','','width=100,height=100,scrollbars=none');return false;"
%>
<td width="36%" align="center">
<TABLE width=240
height=184 border=0 align="center" cellPadding=0 cellSpacing=0
style="BORDER-RIGHT: #ff5b06 1px solid; BORDER-TOP: #ff5b06 1px solid; FILTER: filter : progid:DXImageTransform.Microsoft.DropShadow(color=#ffd7be,offX=1,offY=1,positives=true); BORDER-LEFT: #ff5b06 1px solid; BORDER-BOTTOM: #ff5b06 1px solid">
<TBODY>
<TR>
<TD align=middle bgColor=#ffffff width="150" height="115">
<%if rs("picflag2")=1 then%><!--a <%if rs("picflag")=1 then%>href="<%=url%>"<%end if%>--><img src="upload/<%=rs("picfilename2")%>" width="240" height="184" border="0"></a>
<%else%>
<font color=666666>暂无图片</font>
<%end if%></TD>
</TR>
</TBODY>
</TABLE>
<table cellSpacing=0 cellPadding=0 width=100% border=0>
<tr>
<td height="40" align="center"><!--a <%if rs("picflag")=1 then%>href="<%=url%>"<%end if%>--><%=rs("title")%></a>
</td>
</tr>
</table>
</td>
<%
rs.MoveNext
else
%>
<td width="64%" align="center"> </td>
<%
end if
next
%>
</tr>
<%
loop
rs.Close
%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<!--table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><img src="images/pro/point_l.gif" width="14" height="14" align="absmiddle">
<a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <img src="images/pro/point_r.gif" width="14" height="14" align="absmiddle"></td>
</tr>
</table--></td>
</tr>
</table> 展开
展开全部
<%
Dim rs
set rs = server.createobject("adodb.recordset")
sql="select * from Goods where typeid=2 order by Id desc"
'sql="select * from Goods order by Id desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td align=center>目前还没有产品。<br></td></tr>"
else
rs.pagesize=6
ipage=clng(request("page"))
'response.write ipage
if ipage<=0 then
ipage=1
end if
if ipage>=rs.pagecount then
ipage=rs.pagecount
end if
rs.absolutepage=ipage
rowcount=rs.pagesize
do while not rs.eof and rowcount>0
if rowcount=3 then
response.write "</td><td width=1 height=97% bgcolor=#CCCCCC></td><td valign=top>"
end if
%>
<%
if rs.pagecount>1 then
response.write "<table border='0'><tr><td><b>分页:</b></td>"
for i=1 to rs.pagecount
response.write "<td><a href='1.asp?page=" &i& "'>"
response.write "[<b>"&i&"</b>]</a></td>"
next
response.write "</tr></table>"
end if
end if
set rs=nothing
%>
Dim rs
set rs = server.createobject("adodb.recordset")
sql="select * from Goods where typeid=2 order by Id desc"
'sql="select * from Goods order by Id desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td align=center>目前还没有产品。<br></td></tr>"
else
rs.pagesize=6
ipage=clng(request("page"))
'response.write ipage
if ipage<=0 then
ipage=1
end if
if ipage>=rs.pagecount then
ipage=rs.pagecount
end if
rs.absolutepage=ipage
rowcount=rs.pagesize
do while not rs.eof and rowcount>0
if rowcount=3 then
response.write "</td><td width=1 height=97% bgcolor=#CCCCCC></td><td valign=top>"
end if
%>
<%
if rs.pagecount>1 then
response.write "<table border='0'><tr><td><b>分页:</b></td>"
for i=1 to rs.pagecount
response.write "<td><a href='1.asp?page=" &i& "'>"
response.write "[<b>"&i&"</b>]</a></td>"
next
response.write "</tr></table>"
end if
end if
set rs=nothing
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询