<%
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select top 10 * from news order by hits desc"
rs.open sql,conn,1,1
i=0
do while (not rs.eof) and (i < 10)
if i=1 then
response.write("<img src='icon/1.gif'/>"&rs("title")&"<br>")
elseif i=2 then
response.write("<img src='icon/2.gif'/>"&rs("title")&"<br>")
elseif i=3 then
response.write("<img src='icon/3.gif'/>"&rs("title")&"<br>")
elseif i=4 then
response.write("<img src='icon/4.gif'/>"&rs("title")&"<br>")
elseif i=5 then
response.write("<img src='icon/5.gif'/>"&rs("title")&"<br>")
elseif i=6 then
response.write("<img src='icon/6.gif'/>"&rs("title")&"<br>")
elseif i=7 then
response.write("<img src='icon/7.gif'/>"&rs("title")&"<br>")
elseif i=8 then
response.write("<img src='icon/8.gif'/>"&rs("title")&"<br>")
elseif i=9 then
response.write("<img src='icon/9.gif'/>"&rs("title")&"<br>")
elseif i=10 then
response.write("<img src='icon/10.gif'/>"&rs("title")&"<br>")
i=i+1
rs.movenext
end if
loop
%>
写成这样了 好象是个死循环