newscat.asp
来自「南鄂电子商务学校网: 学校概况、校园动态、师资力量、教学成果、师生论坛、友情链接」· ASP 代码 · 共 81 行
ASP
81 行
<%
sub newscat()
%>
<table width="100%" height="73" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
<td height="27" background="images/pic/title_hot.jpg"></td>
</tr>
<tr>
<td height="180" valign="top" background="images/pic/title_bg.gif">
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="2">
<%
set rs3=server.createobject("adodb.recordset")
dim a_j
a_j=1
sql="select top 10 news_id,news_title,news_count from news order by news_count DESC"
rs3.open sql,conn,1,1
do while not rs3.eof
if a_j>=10 then exit do
a_j=a_j+1
%>
<tr>
<td> <img src="images/pic/star.gif" width="12" height="12" align="middle" border="0"><a href="shownews.asp?news_id=<%=rs3("news_id")%>" title="被点击:<%=rs3("news_count")%> ">
<%if len(Rs3("news_title"))>10 then
response.write " "&left(Rs3("news_title"),8)&"..."
else
response.write " "&Rs3("news_title")
end if%>
</a></td>
</tr>
<tr>
<td>
<%
rs3.movenext
loop
if rs3.eof and rs3.bof then
response.write "暂时没有新闻"
end if
rs3.close
set rs3=nothing
%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="15" background="images/pic/title_bottom.gif"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
<td height="27" background="images/pic/title_search.jpg"></td>
</tr>
<tr>
<td background="images/pic/title_bg.gif">
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="2">
<form name="form2" method="post" action="news.asp">
<tr>
<td align="center"><select name="select">
<option value="news_title">按新闻标题</option>
<option value="news_content">按新闻内容</option>
</select></td>
</tr>
<tr>
<td align="center"><input type="text" name="keyword" class="input" size="20"></td>
</tr>
<tr>
<td align="center"><input name="search" type="image" value="搜索" src="images/pic/search.gif" width="61" height="20"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td height="15" background="images/pic/title_bottom.gif"></td>
</tr>
</table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?