[求助]为什么cookie是空的
我想在b.asp页面利用ajax技术获取a.asp登录页时建立的cookies值,但为什么都是空的呢??(前提:在a.asp登录页中已经成功登录) 注:a.asp和b.asp是两个不同站点下的文件
============b.asp页面程序代码===============
<%
URL = "http://aa/ifcookie.asp?action=1"
Set Retrieval = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
Retrieval.setOption 2, 13056
Retrieval.open "GET", URL, False, "", ""
Retrieval.send()
ResponseTxt = Retrieval.ResponseText
Set Retrieval = Nothing
Response.Write ResponseTxt
Response.End()
%>
==============ifcookie.asp============
<%
If Request.QueryString("action")="1" Then
If Request.Cookies("username") <> "" Then
Response.Write Request.Cookies("username")
Response.End()
Else
Response.Write "false"
Response.End()
End If
End If
%>
问题补充:如果直接从地址栏中输入http://aa/ifcookie.asp?action=1,Request.Cookies("username")又是有的,真晕,快来救命啊