📄 news_top10.asp
字号:
<%
//<!----News top10 ---->
response.write "<table width=100% cellspacing=0 cellpadding=4 class=MainTable>"
response.write " <tr>"
response.write " <td class=MainHead><a href=News_List.asp class=U>最新新闻</a></td>"
response.write " <td class=MainHead align=right><a href=News_List.asp class=U><span style='font-weight: 400'>更多新闻</span></a></td>"
response.write " </tr>"
//最新10条新闻调出
set rs=server.createobject("adodb.recordset")
sql="select top 6 id,news_info_title,news_info_type,news_info_content from news_info order by id desc"
rs.open sql,conn,1,1
if not rs.eof then
set id =rs(0)
set news_info_title =rs(1)
set news_info_type =rs(2)
if news_info_type=1 then
set news_info_content =rs(3)
end if
while not rs.eof
if len(news_info_title)>15 then
news_info_title1=left(news_info_title,15)&"..."
else
news_info_title1=news_info_title
end if
response.write "<tr><td>"
if news_info_type=1 then
response.write "·<a href=News_Detail.asp?id="&id&">"&news_info_title1&"</a>"
else
response.write "·<a href="&news_info_content&" target=_blank>"&news_info_title1&"</a>"
end if
response.write "</td></tr>"
rs.movenext
wend
end if
rs.close
set rs=nothing
response.write "</table>"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -