<table width="996" border="0" align="center" height="20" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC" bgcolor="#CCCCCC">
<tr width="996" height="20" colspan=8>
<td colspan=8 bgcolor="#EFEFEF">&nbsp;&nbsp;当前位置:</a>最新奇迹私服技术文章&gt;&gt;<a href="index.asp">返回首页</a></td>
</tr>
<%
sql="select * from News order by addtime desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td colspan=8 align=center>当前没有公告!</td></tr>"
rs.close
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end ifif (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"news.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move  (currentPage-1)*MaxPerPage
showContent
showpage totalput,MaxPerPage,"news.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"news.asp"
end if
end if
rs.close
end if
sub showContent
dim i
i=0
%>
<%do while not rs.eof%>
<tr height="1" bgcolor=#FFFFFF>
<td colspan=1>&nbsp;&nbsp;<a href="news_display.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
rs.close
end sub
%>
</table>以上是一个文章页面代码    显示出来的只有一列如图要怎么改才能让(如图)右边也显示文章,而且是不重复的文章

解决方案 »

  1.   

    sub showContent 
    dim i 
    i=0 
    %> 
    <%do while not rs.eof%> 
    <tr height="1" bgcolor=#FFFFFF> 
    <td colspan=1>&nbsp;&nbsp; <a href="news_display.asp?id= <%=rs("id")%>" target="_blank"> <%=rs("title")%> </a> </td> 
    </tr> 
    <% 
    i=i+1 
    if i>=MaxPerPage then exit do 
    rs.movenext 
    loop 
      

  2.   

    用循环多写在每行TR中多写TD,在TD中用一定算法填充RS(TITLE)...
      

  3.   


    sub showContent
    dim i
    i=0
    %>
    <%do while not rs.eof%>
    <%if (i mod 0)=0 then%>
    <tr height="1" bgcolor=#FFFFFF>
    <%end if%>
    <td colspan=1>&nbsp;&nbsp; <a href="news_display.asp?id= <%=rs("id")%>" target="_blank"> <%=rs("title")%> </a> </td>
    <%if (i mod 0)=0 then%>
    </tr>
    <%end if%>
    <%
    i=i+1
    if i>=MaxPerPage then exit do
    rs.movenext
    loop
    rs.close
    end sub 
      

  4.   


    这个我知道在那里面填充,可是我不知道该怎么在TD中用一定算法填充RS,,
      

  5.   


    sub showContent
    dim i
    i=0
    %>
    <%do while not rs.eof%>
    <%if (i mod 2)=0 then%>
    <tr height="1" bgcolor=#FFFFFF>
    <%end if%>
    <td colspan=1>&nbsp;&nbsp; <a href="news_display.asp?id= <%=rs("id")%>" target="_blank"> <%=rs("title")%> </a> </td>
    <%if (i mod 2)=0 then%>
    </tr>
    <%end if%>
    <%
    i=i+1
    if i>=MaxPerPage then exit do
    rs.movenext
    loop
    rs.close
    end sub 
      

  6.   

    我知道你这个问题了;这么的;做table两列;之后在每一列;弄一个sql显示;有层次1~10条数据显示左面;11~20显示右面;在table里弄好id号就可以了