<!--#include file="articleconn.asp"--> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> <!-- --> </style> <style type="text/css"> <!-- --> </style> <link href="css.css" rel="stylesheet" type="text/css"> </head>
<body> <% n=1 '查询出为首页图片新闻的最新文章作为首页上的图片新闻显示 if n<> "" then sql="select * from article where picchk=1 order by dateandtime desc" set rs=conn.execute(sql)%> <% do while not rs.eof %> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="80" valign="top"><a href="open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>") target="_blank" ><img src=<%=rs("picurl")%> width="150" height="110" border="0"></a></td> <td width="3%" valign="top"> </td> <td width="87%" valign="middle"><span class="unnamed1"><span class="unnamed2"><span class="unnamed2"><a href="open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>" target="_blank"><%=left(rs("content"),180)%>...</a></span></span></span></td> </tr> </table> <%n=n-1 if n<1 then exit do rs.movenext loop rs.close set rs=nothing conn.close set conn=nothing%> <%end if%> </body> </html> 这是显示首页图片的代码, 我想问一下设那个 <%n=1%> 和后面的<%n=n-1 if n<1 then exit do%>这个有什么作用?