这是一个产品展示界面的代码?展示的产品是3行两列的,我如何改成2行3列的呢?谢谢各位大大解答。把rowcount改成=3变成还是两列,一列4个产品,一列2个产品
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>时尚地带--男人世界</title>
<link href=style.css rel=STYLESHEET type=text/css>
<script language="javascript">
function newswin(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=500,height=400";
var newswin=window.open(url,"newswin",oth);
newswin.focus();
return false;
}
function newswindow(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0";
var newswin=window.open(url,"newswin",oth);
newswin.focus();
return false;
}
</script>
</head>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table height="250" width="645" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr><td valign="top">
<%
Dim rs
set rs = server.createobject("adodb.recordset")
sql="select top 30 * 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=2 then
response.write "</td><td width=1 height=97% bgcolor=#CCCCCC></td><td valign=top>"
end if
%>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" valign="top">
<tr>
<%
If isNull(rs("ImageFile")) Then
%>
<td width="73"><img src="images/noImg.jpg" width="100" height="63" hspace="5" vspace="5"></td>
<%else%>
<td width="73"><a href="ViewImage.asp?id=<%=rs("id")%>" onClick="return newswindow(this.href)"><img src="admin/images/<%=rs("imageFile")%>" width="100" height="63" hspace="5" vspace="5" border="0"></td>
<%end if%>
<td width="1" bgcolor="#CCCCCC"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" height="40"><div align="center"><img src="images/rp_bullet.gif" width="7" height="7"></div></td>
<td><span class="style2">服装名称:<%=rs("name")%> </span></td>
</tr>
<tr>
<td height="20"><div align="center"><img src="images/rp_bullet.gif" width="7" height="7"></div></td>
<td><span class="style2">服装编号:<%=rs("Id")%></span></td>
</tr>
<tr>
<td height="20"><div align="center"><img src="images/rp_bullet.gif" width="7" height="7"></div></td>
<td><span class="style2">参考价格:<%=rs("Model")%></span></td>
</tr>
<tr>
<td height="20"> </td>
<td><a href="GoodsView.asp?id=<%=rs("id")%>" onClick="return newswin(this.href)"><span class="111">详细信息</span></a></td>
</tr>
</table></td>
</tr></table>
<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td></td>
</tr>
</table>
<%
rs.movenext()
rowcount=rowcount-1
loop
%>
</td></tr>
<tr><td>
<%
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
%>
</td></tr>
</table>
</body>
[此贴子已经被作者于2007-8-9 8:56:32编辑过]