asp新手新闻调用问题一列变两列

代码如下,专家可以帮忙看看嘛?万分感谢<tablewidth="100%"border="0"cellspacing="0"cellpadding="3"><%setrs... 代码如下,专家可以帮忙看看嘛?万分感谢<table width="100%" border="0" cellspacing="0" cellpadding="3">
<%
set rs=server.createobject("adodb.recordset")
sql="select top 7 * from ku_news,ku_newskind where ku_news.class=ku_newskind.id and ku_news.shenhe=1 ORDER BY ku_news.dateandtime DESC"
rs.open sql,conn,1,1

if Rs.eof or Rs.bof then
response.write"<div align='center'>还没有添加新闻<div>"
end if
do while not rs.eof
title = rs("title")

%>
<tr>
<%if rs("mode")=2 then%>
<td width="17" height = 24>
<a href="<%=rs("url")%>" title="标题:<%=title%> 时间:<%=rs("dateandtime")%> 点击:<%=rs("hits")%>次" target=_blank>
<font color="<%=rs("yanse")%>">
<%
if Getlen(title)>34 then
response.write LeftStr(title,32)
response.write "..."
else
response.write ""&title&""
end if

%></font></a>
</td><%else%>
<td width="401" height = 24><a href="Ku_shownews.asp?id=<%=rs("ku_news.id")%>" title="标题:<%=title%> 时间:<%=rs("dateandtime")%> 点击:<%=rs("hits")%>次">
<font color="<%=rs("yanse")%>">
<%
if Getlen(title)>32 then
response.write LeftStr(title,30)
response.write "..."
else
response.write ""&title&""
end if

%></font></a>
<% if rs("pic")<>"" then%><img border="0" src="Ku_skin/img.gif" width="13" height="13" alt="图片新闻"><%end if%></td><%end if%>
</tr>
<%
rs.movenext
loop
Rs.Close
Set Rs=Nothing
%>
</table>
展开
 我来答
lanniaogzs
2010-07-27 · TA获得超过409个赞
知道小有建树答主
回答量:1190
采纳率:0%
帮助的人:1039万
展开全部
加Q发代码文件帮你搞定~!
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式