阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
一个简单的用户登录接口asp实现
一个简单的用户登录接口asp实现 }w#Ek=,s#o 出处 r@2{>j8 #q06K2 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> ?HP54G<{xz T[z]~MJL <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ,+u.FQv~ m#D+Yh/y{n <html xmlns="http://www.w3.org/1999/xhtml"> 6N{Vcfq t8"*jt <head> X>[x7t: K/2k/\Jk[_ <script language="javascript" type="text/javascript"> }@6/sg
(1
"unP- <!-- fpjy[$8 I9! eL4e function SaveCookie() rjmKe*_1V (x
p<@- { E+Jh4$x{ ^2gDhoO_ document.cookie = "name=" + document.getElementById("name").value ? m$uqi C
m~h\+" + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 .Z,3:3,] \5+?wpH document.cookie = "pass=" + document.getElementById("pass").value g$&uD ep"YGx[V + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 )+^1QL #n=b*. } M7Pvc%\) jzuOs,:R --> (S:+#v ~R`Rj*Q2Y </script> 8\Y/?$on @w1@|"6vF @PXb^x#k 0>
pOP <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> :Zy7h7P,lT 9N9dQ}[:g <title>[Request samples]</title> !Jo3>!,j G
W]E,a </head> [3a-1, {;(X#vK}9 <body> 6qA48:/F= -b>"2B? <% $or?7 w> i2{xW`AcUh username = Request.Cookies("name") V/Hjd`n)`i [@ ]f@Wd password = Request.Cookies("pass") qvz2u]IOw )^UM8
s '此处可以插入用户数据查询。并替换下面默认密码“admin” u49zc9 N9r}nqCN if username = "" or password <> "admin" then de{KfM`W; #LlHsY530N %> f[3DKA Ghgx8 ]e "Mgx5d ZdHfZ3)dB <form method="post"> i(9=` A} OaU-4
~n; <table> zyTP|SXk y0qrl4S)v <tr> N2uxiXpQZ= \o9-[V#Gm <td>please input your name:</td> v5l)T}Nb `O
(ec <td><input type="text" name="name" id="name" /></td> T6JN@:8 5R}Qp<D[^ </tr> %se4aeOrX /kE3V`es <tr> wEENN_w m8eyAvi6 <td>please input password:</td> y0cHs|8 IY6DZP <td><input type="password" name="pass" id="pass" /></td> By{zX,6' dt(~)*~R </tr> zWpJ\/k~ J#vIzQ <tr> 01N" G'IqAKJ <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> |niYN7 17 ehk5U,d <td><input type="reset" value="reset" /></td> AE`X4q H,`F%G#!`q </tr> uKc
x$ P8!O
N= </table> \J[m4tw^ 3qJOE6[}% </form> VuA7rIF$66 [8|Y2Z\N <%else%> (5-
w>( Y~\71QE> <h1>Welcome to ASP</h1> 0_'(w;!wq: pF kA, <br /> -e<d//> 8K+(CS>xvO <p> t8X$M;$ U\aP hello! <%=username%>.<br> ?bFP'. fP3e{dVf there are <%=Request.TotalBytes%> bit.... W\]bh'( e7e6b-"_2 </p> C]S~DK1 6cR}Mm9Hx3 <%end if%> h>ZNPP8N E/bIq}R6 </body> Xjb 4dip 0|6]ps4Z7 </html>
|
|
[楼 主]
|
Posted: 2006-04-03 14:01 |
| |