<%'以下代碼為保存用戶名和密碼于cookies中function ok()'定義函數(shù),登錄成功后,'調(diào)用該函數(shù)將用戶名和密碼寫入本地COOKIES中select case request.form("tima")'判斷語(yǔ)句'根據(jù)用戶選擇保存時(shí)間,設(shè)置本地COOKIES的過(guò)期時(shí)間caes 1Response.Cookies("name").Expires=Date+1'設(shè)定COOKIES的過(guò)期時(shí)間'當(dāng)Date+1時(shí)保存一天,Date+365時(shí)即保存一年,依此類推;若刪除此句'則瀏覽器關(guān)閉后COOKIES失效Response.Cookies("name")=request.form("name")'創(chuàng)建一個(gè)名為"name"的本地COOKIES,并把用戶名寫入其中Response.Cookies("pwd").Expires=Date+1'保存一日response.Cookies("pwd").request.form("pwd")case 2Response.Cookies("name").Expires=Date+31'保存半年Response.Cookies("name")=request.form("name")Response.Cookies("pwd").Expires=Date+31response.Cookies("pwd")=request.form("pwd")case 3Response.Cookies("name").Expires=Date+182'保存半年Response.Cookies("name")=request.form("name")Response.Cookies("pwd").Expires=Date+182response.Cookies("pwd")=request.form("pwd")case 4Response.Cookies("name").Expires=Date+365'保存一年Response.Cookies("name")=request.form("name")Response.Cookies("pwd").Expires=Date+365response.Cookies("pwd")=request.form("pwd")end selectend function'定義函數(shù)結(jié)束%>
1 回答

叮當(dāng)貓咪
TA貢獻(xiàn)1776條經(jīng)驗(yàn) 獲得超12個(gè)贊
response.Cookies("pwd").request.form("pwd")
寫錯(cuò)了
- 1 回答
- 0 關(guān)注
- 163 瀏覽
添加回答
舉報(bào)
0/150
提交
取消