如何提示用户打开Cookie?
程序员文章站
2022-05-03 15:33:11
dim strcookie, strtrystrcookie = request.cookies("mycook...
dim strcookie, strtry
strcookie = request.cookies("mycookie")
strtry = request.querystring("try")
if strcookie = "" then
' 检测否是设置了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
上一篇: 个个都挑贵的菜来点
下一篇: JSP实现网页访问统计