这里有一行显示多少个的代码吗?
来源:百度知道 编辑:UC知道 时间:2024/05/09 08:33:02
<div id=demo style=overflow:hidden;height:130;width:740;color:#ffffff>
<%
sqlstr="select * from products where 1 "
if request("seek")="y" then
if request("s_type")="sname" then
sqlstr=sqlstr&"and fname like '%"&trim(request("key"))&"%' "
else
sqlstr=sqlstr&"and fno like '%"&trim(request("key"))&"%' "
end if
if request("pSort")<>"" then
sqlstr=sqlstr&" and "&trim(request("pSort"))
end if
else
if request("u")<>"" then
sqlstr=sqlstr&" and ukind="&int(re
<%
sqlstr="select * from products where 1 "
if request("seek")="y" then
if request("s_type")="sname" then
sqlstr=sqlstr&"and fname like '%"&trim(request("key"))&"%' "
else
sqlstr=sqlstr&"and fno like '%"&trim(request("key"))&"%' "
end if
if request("pSort")<>"" then
sqlstr=sqlstr&" and "&trim(request("pSort"))
end if
else
if request("u")<>"" then
sqlstr=sqlstr&" and ukind="&int(re
你这个是一行显示一个,要一行显示固定的多少个(比如5个),可以如下修改:
把下面这一段:
For k=1 To x
%>
<li>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="center" ><a href="showproduct.asp?id=<%=rs("id")%>"><img src="<%="../"&rs("spic")%>" width="120" height="120" border="1" title="<%=rs("fname")%>"/></a></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
</li>
<%
rs.movenext
next
替换为:
For k=1 To x / 5
%>
<li> <table><tr>
<%
for kk=1 to 5
%>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td