Dim strCookie, strTry
strCookie = Request.Cookies("MyCookie")
strTry = Request.QueryString("Try")
If strCookie = "" Then
' 檢測否是設(shè)置了Cookie.
If strTry = "" Then
Response.Cookies("MyCookie") = "Set"
' 重定向到這一頁面再試.
Response.Redirect(Request.ServerVariables("script_NAME")
"?Try=Yes")
Else
' 如果沒有開啟Cookie.
End If
Else
' 客戶端正在接受Cookie.
Response.Cookies("MyCookie").Expires = "April 15, 2001"
End If
您可能感興趣的文章:- javascript 打開頁面window.location和window.open的區(qū)別
- 打開新窗口關(guān)閉當(dāng)前頁面不彈出關(guān)閉提示js代碼
- JSP頁面IE無法打開Internet 站點…… 已終止操作 的解決方法
- JS延遲加載加快頁面打開速度示例代碼
- js中window.open打開一個新的頁面
- JS通過Cookie判斷頁面是否為首次打開