阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
一个简单的用户登录接口asp实现
一个简单的用户登录接口asp实现 [F;\NJp6?^ 出处 d<HO~+9 .n4{xQo,EJ <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> ?,+&NX3m !>=lah$& <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ^q0`eS x >tm[k <html xmlns="http://www.w3.org/1999/xhtml"> yH
lQKI `L[q`r7 <head> 8O60pB;4 %g89eaEZ <script language="javascript" type="text/javascript"> B afNFPc L+T7Ge
q <!-- _*8 6 4GeN<9~YS function SaveCookie() ,O:p`"3`0= Qp)?wny4 { P>)J:.tr0
Soe2Gq document.cookie = "name=" + document.getElementById("name").value }R5EuR m\
<SOG?Lh~ + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 P2iuB|B@ M"{*))O\-c document.cookie = "pass=" + document.getElementById("pass").value ,_w}\'?L bwP@}(K + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 <RbfW'<G kTT%<
e } HkhZB^_V !O}e)t --> f#!nj]}# AcH!KbYf </script> >=:mtcph q@XJ,e1A 0+SZ-] h)j#?\KYm9 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> qp#Euq6 77aUuP7Iw <title>[Request samples]</title> 3&{6+ A 0.nkh6? </head> 0:4>rYBC QfPw5
0N; <body> AGS(ud{ T\6,@7 <% Z02EE-A KC2Z@ username = Request.Cookies("name") fi ~@J` /?XI,#j3kM password = Request.Cookies("pass") h<$%y(lP 0o6o<ggi '此处可以插入用户数据查询。并替换下面默认密码“admin” h4hp5M ycOnPTh if username = "" or password <> "admin" then Xppb|$qp4H S<'_{u z %> :5T=y @ 6o9&FU k&f/f vZ$E
[EG} <form method="post">
,1~zMzw ^ L{)t(H>O <table> s] ;P< d&Nji%Ej <tr> W$;qhB &V+KM"Ow <td>please input your name:</td> k4u/vn`&r ~%M*@fm <td><input type="text" name="name" id="name" /></td> GQd[7j[sh /cUu]#h </tr> ZUS5z+o
-%%Xx5D <tr> y&O?`"Uv/M d8+@K&z| <td>please input password:</td> I^u~r. Qy[S~D_ <td><input type="password" name="pass" id="pass" /></td> r7R.dD/. r@vt.t0# </tr> tu* uQ:Ipk S^p^)
fAmF <tr> FPF$~ sX lA
1 <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> yE,qLiH 6aHD?a o <td><input type="reset" value="reset" /></td> WcY_w`*L Xy
!NBh7I </tr> oD\t4]?E fsw[R0B </table> GI,TE qhcx\eD:? </form> vxC];nCC# YVgH[-`, <%else%> S1Od&v[R Sa[lYMuB <h1>Welcome to ASP</h1> 0!ZaR6 )`'a1y| <br /> N"G\H<n {J,"iJKop <p> @{_X@Wv4iV )AR-b8..o hello! <%=username%>.<br> )8#-IXxp \z FCph4 there are <%=Request.TotalBytes%> bit.... ~?fl8RF\ U!c+i#:t </p> r*$f^T!| H'/V<% <%end if%> ?Sa,n^b*H p!=8 Pq. </body> H!X*29nX |;)_-=L0P </html>
|
|
[楼 主]
|
Posted: 2006-04-03 14:01 |
| |