?? info_news.asp
字號:
<table width="23%" border="0" cellspacing="0" cellpadding="0" height="56">
<tr>
<td background="images/bj_x.gif" height="1"></td>
</tr>
<tr>
<td width="102"> <img src="images/main/news2.gif" width="178" height="34"></td>
</tr>
<tr>
<td height="1" background="images/bj_x.gif"></td>
</tr>
<tr>
<%'dim i
i=0
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 6 newsname,adddate,newsid from sh_news order by adddate desc",conn,1,1
if rs.eof and rs.bof then
response.write "目前還沒有新聞!"
else
do while not rs.eof
i=i+1%>
<td width="100%" height="24" background="images/main/dp_bg3.gif"> <font color="#FF0000">
<%if len(trim(rs("newsname")))>11 then
response.write " <a href=""javascript:;"" onClick=""javascript:window.open('news.asp?id="&rs("newsid")&"','news','width=432,height=288,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&year(rs("adddate"))&"年"&month(rs("adddate"))&"月"&day(rs("adddate"))&"日發布><font color=#FF0000>"&left(trim(rs("newsname")),9)&"...."&"</font></a><br>"
else
response.write " <a href=""javascript:;"" onClick=""javascript:window.open('news.asp?id="&rs("newsid")&"','news','width=432,height=288,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&year(rs("adddate"))&"年"&month(rs("adddate"))&"月"&day(rs("adddate"))&"日發布><font color=#FF0000>"&trim(rs("newsname"))&"</font></a><br>"
end if
if i>=6 then exit do%>
</font></td>
</tr>
<tr align="right" >
<td height="24" colspan="2" ><a href="list_news.asp" target="_blank"><font color="#FF3300">更多>>></font></a></td>
</tr>
<%rs.movenext
loop
end if
rs.close
set rs=nothing%>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -