|
login.htm lt;% @ Language=#106avascript %gt; lt;% if (Request.Cookies("SavedLogin").HasKeys) { nbsp; nbsp; Response.Redirect("checklogin.asp?Cookie=1") } %gt;
lt;htmlgt; lt;headgt; lt;titlegt;精彩春风之登录页面lt;/titlegt; lt;/headgt; lt;bodygt; 我要登录随风起舞 lt;FORM ACTION="CheckLogin.asp" METHOD="POST"gt; nbsp; nbsp; 电子邮件: lt;INPUT TYPE="Text" NAME="email" SIZE="40"gt;lt;BRgt; nbsp; nbsp; 口令: lt;INPUT TYPE="Password" NAME="Password" SIZE="40"gt;lt;Pgt; nbsp; nbsp; lt;INPUT TYPE="Checkbox" NAME="SaveLogin"gt; 要把登录内容存为Cookie吗?lt;Pgt; nbsp; nbsp; lt;INPUT TYPE="Submit" VALUE="登录"gt;lt;INPUT TYPE="RESET"gt; lt;/FORMgt; nbsp; checklogin.asp lt;% dim strEmail if Request.QueryString("Cookie") = 1 then nbsp; nbsp; strEMail = Request.Cookies("SavedLogin")("Email") else nbsp; nbsp; strEMail = Request.Form("email") end if
dim bLoginSaved
if Request.Form("SaveLogin") = "on" then nbsp; nbsp; Response.Cookies("SavedLogin")("EMail") = Request("email") nbsp; nbsp; Response.Cookies("SavedLogin")("pw") = Request("password") nbsp; nbsp; Response.Cookies("SavedLogin").Expires = Date + 30 nbsp; nbsp; bLoginSaved = True else nbsp; nbsp; bLoginSaved = False end if %gt;
lt;htmlgt; lt;headgt; lt;titlegt;精彩春风之登录验证lt;/titlegt; lt;/headgt; lt;bodygt;
lt;% if bLoginSaved then %gt; nbsp; nbsp; 将登录信息保存到Cookie里去lt;HRgt; lt;% end if %gt; 欢迎光临随风起舞!lt;Pgt;
lt;% if Request.QueryString("Cookie") = 1 then %gt; nbsp; nbsp; 保存成功!lt;Pgt; lt;% end if %gt; 请确认您的电子邮件: lt;% = strEMail %gt; lt;/bodygt;lt;/htmlgt; (编辑:大同站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|