投票:帮我解释一下代码
 
1 票:100.00%
    您没有登录,无法进行投票和查看投票结果,请登录论坛  [总票数 1 票  截止时间 2032-10-3 17:30]

标题:帮我解释一下代码
饥喝
Rank: 1
等级:新手上路
帖子:24
积分:340
注册:2005-4-5
帮我解释一下代码

<HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD>

<BODY> <% dim cn,rs,i set cn=server.createobject("adodb.connection") cn.open "driver={sql server};server=qgm;database=asptest;uid=sa;pwd=woainiany#" set rs=server.createobject("adodb.recordset") rs.open "select * from chapter1",cn,1 if len(request("i"))=0 then i=1 else if request("type")= "next" then i=request("i")+1 for j=1 to i-1 if not rs.eof then rs.movenext next elseif request("type")="previous" then i=request("i")-1 for j=1 to i if not rs.eof then rs.movenext next if not rs.bof then rs.moveprevious elseif request("type")= "first" then i=1 rs.movefirst elseif request("type")="last" then i=3 rs.movenext end if end if %> <p align="center">µ±Ç°¼Ç¼λÖÃ<%=i%></p> <table border="1" bordercolor="#111111" cellpadding="0" cellspacing="0" width="336" align="center"> <tr> <td width="79">×¢²áID</td> <td width="79">×¢²áÃÜÂë</td> <td width="138">e-mailµØÖ·</td> </tr> <%if not rs.eof and not rs.bof then%> <tr> <td width="79"><%=rs(0)%></td> <td width="79"><%=rs(1)%></td> <td width="138"><%=rs(2)%></td> </tr> <%end if%> </table> <p align="center"> <%if i<>1 then%> <a href="08_03.asp?type=first&i=<%=i%>">movefirst</a> <%else%> movefirst <%end if%> <%if not rs.eof then%> <a href="08_03.asp?type=previous&i=<%=i%>">movenext</a> <%else%> movenext <%end if%> <%if not rs.bof then%> <a href="08_03.asp?type=previous&i=<%=i%>">moveprevious</a> <%else%> moveprevious <%end if%> <%if i<>3 then%> <a href="08_03.asp?type=last&i=<%=i%>">movelast</a> <%else%> movelast <%end if %> <% rs.close set rs=nothing cn.close set cn=nothing %> </BODY> </HTML>

2005-05-19 17:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-18750-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.052083 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved