📄 news_top10.asp
字号:
<%
//<!----News top10 ---->
response.write "<td valign=top align=center width=200>"&_
"<table cellspacing=0 cellpadding=4 class=MainTable width=100% >"&_
" <tr>"&_
" <td class=MainHead><a href=News_List.asp>最新新闻</a></td>"&_
" <td class=MainHead align=right><a href=News_List.asp><span style='font-weight: 400'>更多新闻</span></a></td>"&_
" </tr></table><marquee style=""position:relative;"" onMouseOver=""this.stop()"" onMouseOut=""this.start()"" scrollamount=""1"" scrolldelay=""85"" direction=""up"" behavior=""scroll"" height=""130"" width=""200"">"
//最新10条新闻调出
set rs=server.createobject("adodb.recordset")
sql="select top 7 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
response.write "<table cellspacing=0 cellpadding=4 class=MainTable width=100% >"
set id =rs(0)
set news_info_title =rs(1)
set news_info_type =rs(2)
set news_info_content =rs(3)
while not rs.eof
if len(news_info_title)>22 then
news_info_title1=left(news_info_title,20)&"..."
else
news_info_title1=news_info_title
end if
response.write "<tr><td colspan=2>"
if news_info_type=1 then
response.write "·<span style=""font-size: 12px""><a href=News_Detail.asp?id="&id&">"&news_info_title1&"</a></span>"
else
response.write "·<span style=""font-size: 12px""><a href="&news_info_content&" target=_blank>"&news_info_title1&"</a></span>"
end if
response.write "</td></tr>"
rs.movenext
wend
end if
rs.close
set rs=nothing
response.write "</table></marquee></td></tr></table>"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -