asp cookie问题
index.asp代码
<%
if request.Cookies("pos")("tkwst_username")="" then%>
<script type="text/javascript">
function window.onload(){login_();}
</script>
<%end if%>
login_()涵数打开登陆页面
login.asp代码
function CheckUser()
{
if($.formValidator.pageIsValid()){
$.ajax({
type:"post",
url:"ajax.asp?action=checkuser",
data:"username="+escape($("#username").val())+"&userpwd="+escape($("#userpwd").val()),
error:function(){alert("查询失败!");},
success:function(data)
{ alert(data);
if (unescape(data)!="")
{
parent.location.href="index.asp";
}
else
{
alert("\n提示:用户名或密码错误,也可能是你所在的用户组不能登陆");
}
}})
}
}
cookies在ajax.asp页面写入,在index.asp页面获取不到!!!