left.asp
来自「本实例为一个完整的网上购物商城的完整例子程序,里面有所以的源代码.希望对大家学习」· ASP 代码 · 共 70 行
ASP
70 行
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#9999CC">
<td height="25" colspan="2" align="center" style="border-top: 1 solid #000000;border-bottom: 1 solid #000000"><font color="#FFFFFF">最新专题
NEW10</font></td>
</tr>
<%
t=0
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from NEWS order by id desc"
rs.Open sql, conn, 1, 1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
<tr onmouseover="this.bgColor='#ffffff';"onmouseout="this.bgColor='#efefef'; "bgColor=#efefef>
<td width="18%" height="22" align="center" style="border-right: 1 solid #000000;border-bottom: 1 solid #000000"><%= t %></td>
<td width="82%" style="border-bottom: 1 solid #000000"><a href="list.asp?id=<%=rs("id")%>" title="<%=rs("title")%>"><%=left(rs("title"), 13)%></a></td>
</tr>
<%
if t >= 10 then exit do
rs.movenext
loop
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
%>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#9999CC">
<td width="82%" align="center" bgcolor="#9999CC" style="border-bottom: 1 solid #000000"><font color="#FFFFFF">热门专题
TOP10</font></td>
<td width="18%" height="25" align="center" style="border-bottom: 1 solid #000000">点击</td>
</tr>
<tr>
<td height="22" colspan="2" align="center">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<%
t=0
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from NEWS order by hits desc"
rs.Open sql, conn, 1, 1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
<tr onmouseover="this.bgColor='#ffffff';"onmouseout="this.bgColor='#efefef'; "bgColor=#efefef>
<td width="82%" style="border-bottom: 1 solid #000000"><a href="list.asp?id=<%=rs("id")%>" title="<%=rs("title")%>"><%=left(rs("title"), 13)%></a></td>
<td width="18%" height="22" align="center" style="border-bottom: 1 solid #000000;border-left: 1 solid #000000"><font color="#FF0000"><%=rs("hits")%></font></td>
</tr>
<%
if t >= 10 then exit do
rs.movenext
loop
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
rs.close
%>
</table></td>
</tr>
</table></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?