求助:asp如何实现新闻列表分两列显示?急!
<tablewidth="98%"border="0"cellpadding="0"cellspacing="0"class="news"><%'setrs=server...
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="news">
<%'
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from int86_news where anclassid=6 order by adddate desc",conn,1,1
%>
<%do while not rs.eof%>
<tr>
<td height="20"> ·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table> 展开
<%'
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from int86_news where anclassid=6 order by adddate desc",conn,1,1
%>
<%do while not rs.eof%>
<tr>
<td height="20"> ·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table> 展开
展开全部
直接用rs.movenext就可以
具体代码如下
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="news">
<%'
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from int86_news where anclassid=6 order by adddate desc",conn,1,1
%>
<%do while not rs.eof%>
<tr>
<td width="50%" height="20"> ·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
<%rs.movenext%>
<td width="50%">·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
具体代码如下
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="news">
<%'
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from int86_news where anclassid=6 order by adddate desc",conn,1,1
%>
<%do while not rs.eof%>
<tr>
<td width="50%" height="20"> ·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
<%rs.movenext%>
<td width="50%">·<font color="#925f07"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank">
<%if len(trim(rs("title")))>17 then
response.write left(trim(rs("title")),16)&"..."
else
response.write trim(rs("title"))
end if
%>
</a></font></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
网易云信
2023-12-06 广告
2023-12-06 广告
很高兴能回答您的问题。以下是一段针对“一对一消息组件”的描述,字数在200字左右:该组件支持用户之间的私密交流,让沟通更加直接和高效。通过它,您可以向特定对象发送消息,并实时查看消息状态,包括对方是否已读或未读。同时,该组件还支持富文本消息...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询