把以下代碼加入驗證頁
<%if Trim(Cstr(requestQueryString("check")))="true" then ‘用來判斷是否有選擇記住密碼
ResponseCookies("UserCookie")("username") = Trim(Cstr(requestForm("username")))
ResponseCookies("UserCookie")("passwords") = trim(requestForm("passwords"))
’ResponseCookies("UserCookie")Path = "/loginasp"
ResponseCookies("UserCookie")Expires= DateAdd("y"Now())
end if%>
登錄頁代碼
//這段代碼是用來判斷是否有選擇記住密碼同時也發送一個判斷字段給後台
<script type="text/javascript">
function check()
{if(documentgetElementById("checkbox")checked)
alert(documentgetElementById("checkbox")checked)
documentgetElementById("ddd")action=’checkasp?id=user&check=’+documentgetElementById("checkbox")checked;}
</script>
‘以下代碼是用來實現記住密碼的功能
<%
strUsername=RequestCookies("UserCookie")("username")
strPassword=RequestCookies("UserCookie")("passwords")
%>
From:http://tw.wingwit.com/Article/program/net/201311/14088.html