| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 410 人关注过本帖
标题:关于排列的问题
只看楼主 加入收藏
zxtvip
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-11-17
收藏
 问题点数:0 回复次数:3 
关于排列的问题

<!--#include file="conn.asp" -->
<%
Set rc=Server.CreateObject("ADODB.Recordset")
sql="Select * from hp_shows order by Shows_id desc"
rc.open sql,conn,1,1
rc.pagesize=5
dim showspage
showspage=1
if request("showspage")<>"" then
showspage=cint(request("showspage"))
end if
if not rc.EOF and not rc.bof then
rc.absolutepage=showspage
end if
count=rc.pagesize
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>酷站推荐</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #005151;
}
a {
font-size: 12px;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<link href="link.css" rel="stylesheet" type="text/css">
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="900" height="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#FFFFFF"><table width="890" height="140" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="bottom" background="images/kz_logo.jpg"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="100">
<param name="movie" value="images/yu.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="images/yu.swf" width="550" height="100" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object></td>
</tr>
</table></td>
</tr>
</table>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="6"></td>
</tr>
<tr>
<td height="26" align="left" bgcolor="#000000" class="bai12">&nbsp;&nbsp; 您当前的位置:首页 → 酷站推荐</td>
</tr>
</table>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<% if rc.eof then
Response.Write("暂无作品!")
end if
do while not rc.eof and count>0%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td height="125" align="center" valign="middle"><a href="Click.asp?Shows_id=<%=rc("Shows_id")%>" target=_blank><img src="<%=rc("shows_pic")%>" width="145" height="95" border="0"></a></td>
</tr>
</table>
<%
rc.movenext
count=count-1
loop
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="#003737"></td>
</tr>
<tr>
<td height="1" bgcolor="#007B7B"></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="38%" align="left" valign="middle" bgcolor="#005151" class="bd">Copyright All Rights Reserved </td>
<td width="60%" height="27" colspan="3" align="right" valign="middle" bgcolor="#005151" class="font">共<%=rc.pagecount%>页 <%=rc.pagesize%>个/页 目前第<%=Showspage%>页 <a href="?Showspage=1">首页</a>
<%if Showspage>1 then%>
<a href="?Showspage=<%=Showspage-1%>">上页</a>
<%else%>
上页
<%end if%>
<%if Showspage <rc.pagecount then %>
<a href="?Showspage=<%=Showspage+1%>">下页</a>
<%else%>
下页
<%end if%>
<a href=?Showspage=<%=rc.pagecount%>>尾页</a>&nbsp;</td>
</tr>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30">&nbsp;</td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>


大家帮忙看一下,这个页面,我想实现每页显示5行,第行显示5个,而且要横向排列的,它现在是竖向排列的.
求各位帮帮忙了!
急~~~~~
在线等~~~~~

搜索更多相关主题的帖子: 排列 
2006-11-17 15:06
做人很低调
Rank: 5Rank: 5
等 级:贵宾
威 望:18
帖 子:1268
专家分:0
注 册:2006-8-2
收藏
得分:0 

<% if rc.eof then
Response.Write("暂无作品!")
end if
do while not rc.eof and count>0%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td height="125" align="center" valign="middle"><a href="Click.asp?Shows_id=<%=rc("Shows_id")%>" target=_blank><img src="<%=rc("shows_pic")%>" width="145" height="95" border="0"></a></td>
</tr>
</table>
<%
rc.movenext
count=count-1
loop
%>


把你上边写的换成下边的。。。你循环的是table 这样不行 你要循环td

<table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>
<% if rc.eof then
Response.Write("暂无作品!")
end if

dim i
i = 0
do while not rc.eof
%>
<td height="125" align="center" valign="middle"><a href="Click.asp?Shows_id=<%=rc("Shows_id")%>" target=_blank><img src="<%=rc("shows_pic")%>" width="145" height="95" border="0"></a></td>
<%
i = i + 1
if (i mod 5) = 0 then response.Write("</tr><tr>")
rc.movenext
loop
%>
</tr>
</table>


其实我很低调,只是你不知道...
2006-11-17 15:52
zxtvip
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-11-17
收藏
得分:0 
十分感谢!!!!!
万分感激!!!!!
2006-11-17 16:52
做人很低调
Rank: 5Rank: 5
等 级:贵宾
威 望:18
帖 子:1268
专家分:0
注 册:2006-8-2
收藏
得分:0 

不客气


其实我很低调,只是你不知道...
2006-11-17 16:58
快速回复:关于排列的问题
数据加载中...
 
   



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

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