各位大虾帮帮俺!
大家帮个忙,目前程序显示2列,我想实现显示4列,不知如何修改,请大家帮个忙!
'读取音乐列表
sql= "select * from down where tid in ( "&sqqq& ") order by date desc "
rs.open sql,conn,1,1
if rs.eof then
lb=lb& " <table cellSpacing= " "20 " " border= " "0 " " cellpadding= " "0 " " cellspacing= " "0 " " style= " "border-collapse: collapse " " width= " "100% " "> <tr> <td width= " "100% " " align= " "center " "> Sorry! 暂时没有音乐! <p> 如有问题,请联系管理员: <a href= " "mailto:hao123@163.com " "> hao123@163.com </a> </td> </tr> </table> "
mpage=1
allshu=0
else
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
rs.move (currentPage-1)*MaxPerPage
allshu=rs.recordcount
h=0
lb=lb& " <table cellSpacing= " "1 " " border= " "0 " " cellpadding= " "0 " " cellspacing= " "0 " " style= " "border-collapse: collapse " " width= " "230 " "> "
do while not rs.eof
h=h+1
lb=lb& " <tr> <td width= " "50% " "> <table border= " "0 " " cellSpacing= " "0 " " cellpadding= " "0 " " cellspacing= " "0 " " style= " "border-collapse: collapse " " width= " "100% " " align= " "center " "> "
lb=lb& " <tr> <td width= " "30% " " valign= " "top " "> <a href= " "../flash/ "&rs( "id ")& ".htm " "> <img width= " "100 " " height= " "75 " " border= " "0 " " src= "&rs( "pic ")& " class= " "border2 " "> </a> </td> <br> <font color= " "#FE0166 " "> "&rs( "cxn ")& " </font> "
lb=lb& " </td> </tr> <tr> <td width= " "50% " " valign= " "top " " colspan= " "2 " "> </td> </tr> </table> </td> "
rs.movenext
lb=lb& " <td width= " "50% " "> <table border= " "0 " " cellSpacing= " "0 " " cellpadding= " "0 " " cellspacing= " "0 " " style= " "border-collapse: collapse " " width= " "100% " " align= " "center " "> "
lb=lb& " <tr> <td width= " "30% " " valign= " "top " "> <a href= " "../flash/ "&rs( "id ")& ".htm " "> <img width= " "100 " " height= " "75 " " border= " "0 " " src= "&rs( "pic ")& " class= " "border2 " "> </a> </td> <br> <font color= " "#FE0166 " "> "&rs( "cxn ")& " </font> "
lb=lb& " </td> </tr> <tr> <td width= " "50% " " valign= " "top " " colspan= " "2 " "> </td> </tr> </table> </td> </tr> "
if h> =MaxPerPage/2 then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
lb=lb& " </table> "
conn.close
set conn=nothing
[解决办法]
一个例子:
<table width= "99% " border= "0 " cellpadding= "3 " cellspacing= "0 ">
<%
linevalue=6
tdvalue=100\linevalue
ti=0
while not temp.eof
province=temp( "province ")
expr1=temp( "expr1 ")
if ti=0 then
%>
<tr>
<%
end if
if ti mod linevalue=0 and ti <> 0 then
%>
</tr>
<tr>
<td height= "1 " colspan= " <%=linevalue%> " background= "../mydoc/images/brownline.gif "> </td>
</tr>
<tr>
<%
end if
%>
<td width= " <%=tdvalue%> % " height= "25 "> <a href= "stockmore.asp?province= <%=province%> &stype=1&type1= <%=typename1%> " target= "_blank " class= "red14 "> <b class= "blue " style= "font-size:14px; "> <%=province%> </b> </a> ( <span class= "red "> <%=expr1%> 家 </span> ) </td>
<%
ti=ti+1
temp.movenext
wend
if ti mod linevalue <> 0 then
divstr=linevalue-ti mod linevalue
for i=1 to divstr
%>
<td width= " <%=tdvalue%> % " height= "25 "> </td>
<%
next
end if
%>
</tr>
<tr>
<td height= "1 " colspan= " <%=linevalue%> " background= "../mydoc/images/brownline.gif "> </td>
</tr>
</table>