阿七 |
2006-04-03 14:01 |
一个简单的用户登录接口asp实现 bY.VNA 出处 a-E}3a ih/E,B" <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> N10U&L'w r!dWI <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> qE[YZ(/f0& ~qeFSU
( <html xmlns="http://www.w3.org/1999/xhtml"> ciN\SA ZY |xcI~ X7Q <head> U< G 2tn( U< Xdhgo? <script language="javascript" type="text/javascript"> lP`BKc,
]}N
01yw|s <!-- Rv9jLH E3O^Tg?j function SaveCookie() MXcW
&b aqI"4v]~b { k*fU:q1
i m;6$3 document.cookie = "name=" + document.getElementById("name").value {owuYVm :}v-+eIQ + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 i>YQ<A1 NUltuM document.cookie = "pass=" + document.getElementById("pass").value &}k7iaO
@!f4>iUy + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 %|(c?`2| (~^fx\-S } $q@d.Z>; |cma7q}p --> KN|<yF EYq?NL=' </script> D:/ n2_ fx_#3=bXi
:9UgERjra %Gh5!e:$SI <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> v<!S_7h xGwImF$r <title>[Request samples]</title> b]4dmc*N+ #4'wF4DR@ </head> w'H'o!*/ %f1%9YH <body> }
%j
F!d rY_~(?XS <% NZq-%bE .c"nDCFVR username = Request.Cookies("name") K?^;|m- N*-tBz password = Request.Cookies("pass") u<BU4c/p l'+3
6 '此处可以插入用户数据查询。并替换下面默认密码“admin” }GB~3
J wX"hUu if username = "" or password <> "admin" then =:WZV8@% ebk>e* %> 9* )&hhBs, c|Ivet>3 FQ<-Wc ]
ZY2\' <form method="post"> cfLF@LW!]) S>yi D`v <table>
}e[ E JmI%7bH@ <tr> .q@?sdGD =A"Abmx| <td>please input your name:</td> DB' 0 Vm[Rp," <td><input type="text" name="name" id="name" /></td> U: 9&0`k( R}&?9tVRR </tr>
s
fM"!{7 #t+?eye~ <tr> -/Q5?0z F5o8@ Ib]: <td>please input password:</td> E'AR
.! Y+?QHtZL <td><input type="password" name="pass" id="pass" /></td> .a%6A#<X I5Vn#_q+b </tr> jl,gqMn"V E)v~kC}7. <tr> b;i*}4h! 22l'kvo4" <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> q)q3p uzd7v, <td><input type="reset" value="reset" /></td> tr0b#4 "#d$$ 8 </tr> Vk6c^/v *lfjsrPu </table> ` H'G"V #7uH>\r </form> m<gdyY
b_x!m{ <%else%> 1[egCC\Mo_ -)A:@+
GF <h1>Welcome to ASP</h1> +t7HlAXB# HhbBt'fH <br /> {v"f
){ l6'KIg <p> '(]Wtx%9" (:iMs)
iO{ hello! <%=username%>.<br> t>[QW`EeP @nH3nn there are <%=Request.TotalBytes%> bit.... %JeNDXbI4 _S_,rTf& </p> xF_u:}7` iM .yen_vp <%end if%> `I7s|9-= <@J$hs9s </body> %|jS`kj o[;P@F </html> |
|