| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 581 人关注过本帖
标题:[求助]ASP产品展示问题
只看楼主 加入收藏
zjwlhxy
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-5-14
收藏
 问题点数:0 回复次数:2 
[求助]ASP产品展示问题

这是一个产品展示界面的代码?展示的产品是3行两列的,我如何改成2行3列的呢?谢谢各位大大解答。
<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=3 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">&nbsp;</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>

搜索更多相关主题的帖子: ASP 展示 
2007-08-08 13:56
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
if rowcount=3 then
改成
if rowcount=2 then
2007-08-08 15:14
zjwlhxy
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-5-14
收藏
得分:0 

谢谢

2007-08-08 16:58
快速回复:[求助]ASP产品展示问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015066 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved