常州五颜六色网络技术有限公司 -> 网站建设 -> 一个简单的用户登录接口asp实现 登录 -> 注册 -> 回复主题 -> 发表主题

阿七 2006-04-03 14:01
一个简单的用户登录接口asp实现 0KgP'oWvY  
出处   6=$< R4B  
j|Vl\Z&o)  
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> &uO-h  
KU(BY}/ ^  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> SDE+"MjBY  
.$}z</#!  
<html xmlns="http://www.w3.org/1999/xhtml"> p~8O6h@J  
9XDSL[[  
<head> 3ddw'b'aQ  
g3[-[G^5  
<script language="javascript" type="text/javascript"> >]ux3F3\  
D>W&#A8&y  
<!-- 4Ps;Cor+  
Hqs-q4G$  
  function SaveCookie() sPW :[  
H3R{+7  
  { ibQ xL3  
F::Ki4{jJ  
    document.cookie = "name=" + document.getElementById("name").value /LWk>[Z;  
~<K,P   
              + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 I|&DXF  
-A<@Pg  
    document.cookie = "pass=" + document.getElementById("pass").value LB]3-FsU+  
J>T98y/))  
              + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 ?K2EK'-q  
52o^]  
  } 2Ul8<${c{  
qfCZ [D  
--> 0Mn |Yb4p  
@o?Y[BR  
</script> 'JdK0w#  
[c1Gq)ht  
af @a /  
;g#n Gs>  
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 'Y ,2CN  
x(EwHg>;  
<title>[Request samples]</title> WO%pX+PoH  
1QmOUw}yj  
</head> eA]8M^  
I`IW^eZM  
<body> i;]0>g4  
2eRk_j]  
  <% i qxMTH#!  
@?]>4+Oa0  
    username = Request.Cookies("name") Q -$) H;,  
X)RgXl{  
    password = Request.Cookies("pass") o58c!44  
v8C($<3%  
    '此处可以插入用户数据查询。并替换下面默认密码“admin” G~&8/ s  
=IX-n$d`>  
    if username = "" or password <> "admin" then   DEkv,e  
{y5 L  
  %> *K?UWi#$  
2x|F Vp  
  4/*@cW  
 <{ v %2  
  <form method="post"> Mby4(M+&n  
6Ktq7'Z@  
  <table> nLk`W"irM  
 oVp/EQ  
  <tr> K9}Brhe  
7KUf,0D  
    <td>please input your name:</td> pQ^V<6z}  
)+,h}XqlX  
    <td><input type="text" name="name" id="name" /></td> tD#)  
Qof%j@  
  </tr> 2-UD^;0  
t(6i4c>  
  <tr> m&q0 _nay  
qW4\t  
    <td>please input password:</td> T]/>c  
E^{!B]/oP  
    <td><input type="password" name="pass" id="pass" /></td> T?Z&\g0yp  
dOaCdnd~  
  </tr> Pq{p\Qkj  
U %BtBPL  
  <tr> }{,Wha5\n  
5f0g7w =-  
    <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> WH7UJCQ  
};P=|t(r  
    <td><input type="reset" value="reset" /></td> >P}XCAU  
 Q3bU"f  
  </tr> 8sI$  
~@@$-,}X   
  </table> p9\*n5{  
}?6;;d#  
  </form>   1#AxFdm1  
b *0uxvLu  
  <%else%> Ii/{xVMD  
3'A0{(b  
  <h1>Welcome to ASP</h1> bF,.6iKI  
CZ$B2i6  
  <br /> 7\nXJ381  
EASmB  
  <p> lMg#zT!?  
BKE?o^03  
  hello! <%=username%>.<br> :.a184ax  
5X5UUdTM  
  there are <%=Request.TotalBytes%> bit.... rHOhi|+  
HmU6:8V *Z  
  </p> ]Z=al`-  
v&]y zl  
  <%end if%> i tk/1  
8uW%jG3/  
</body> 3a ZS1]/  
WMW Mb3  
</html>


查看完整版本: [-- 一个简单的用户登录接口asp实现 --] [-- top --]



Copyright © 2005-2014 5y6s Inc. 苏ICP备05001866号 Powered by PHPWind 5.0.1
Time 0.009710 second(s),query:3 Gzip enabled