展会信息港展会大全

ASP实现记住密码的功能 android软件开发教程
来源:互联网   发布日期:2016-03-01 13:13:56   浏览:1886次  

导读:把以下代码加入验证页: %if Trim(Cstr(request.QueryString(check)))=true then ‘用来判断是否有选择记住密码 Response.Cookies(UserCookie)(username) = Trim(Cstr(request.Form(username))) Response.Cookies(UserCookie)(passwords) = trim(request.For...

把以下代码加入验证页:

<%if Trim(Cstr(request.QueryString("check")))="true" then ‘用来判断是否有选择记住密码

Response.Cookies("UserCookie")("username") = Trim(Cstr(request.Form("username")))

Response.Cookies("UserCookie")("passwords") = trim(request.Form("passwords"))

’Response.Cookies("UserCookie").Path = "/login.asp"

Response.Cookies("UserCookie").Expires= DateAdd("y",1,Now())

end if%>

登录页代码:

//这段代码是用来判断是否有选择记住密码,同时也发送一个判断字段给后台

<script type="text/javascript">

function check()

{if(document.getElementById("checkbox").checked)

alert(document.getElementById("checkbox").checked)

document.getElementById("ddd").action=’check.asp?id=user&check=’+document.getElementById("checkbox").checked;}

</script>

‘以下代码是用来实现记住密码的功能

<%

strUsername=Request.Cookies("UserCookie")("username")

strPassword=Request.Cookies("UserCookie")("passwords")

%>

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港