function exechtloginjs()
{
if (xmlhttp.readyState == 4 || xmlhttp.status == 200)// 判断请求状态 请求成功,开始处理返回结果
{ if(xmlhttp.responseText=="1")
{
//window.location="index.aspx";
window.alert("您的浏览器设置已被禁用 Cookies,您必须设置浏览器允许使用 Cookies 选项后才能使用本系统。");
}
if(xmlhttp.responseText=="2")
{
$1("div_auth").innerHTML="对不起,验证码错误!";
$1("Submit").disabled=true;
}
if(xmlhttp.responseText=="3")
{
$1("div_auth").innerHTML="恭喜,验证码输入正确!";
$1("Submit").disabled=false;
}
if(xmlhttp.responseText=="failed")
{
window.alert("用户名或密码错误");
}
if(xmlhttp.responseText=="success"&&"3")
{
window.location="../BackwardStage/Index.aspx";
}
}
else{
window.alert("您所请求的页面有错误!");
}
}
返回结果处理函数是以上! 在本地是可以,但是上服务器后 一直都是 “您所请求的页面有错误!” 为啥呢 !!! 跪求 !!!
{
if (xmlhttp.readyState == 4 || xmlhttp.status == 200)// 判断请求状态 请求成功,开始处理返回结果
{ if(xmlhttp.responseText=="1")
{
//window.location="index.aspx";
window.alert("您的浏览器设置已被禁用 Cookies,您必须设置浏览器允许使用 Cookies 选项后才能使用本系统。");
}
if(xmlhttp.responseText=="2")
{
$1("div_auth").innerHTML="对不起,验证码错误!";
$1("Submit").disabled=true;
}
if(xmlhttp.responseText=="3")
{
$1("div_auth").innerHTML="恭喜,验证码输入正确!";
$1("Submit").disabled=false;
}
if(xmlhttp.responseText=="failed")
{
window.alert("用户名或密码错误");
}
if(xmlhttp.responseText=="success"&&"3")
{
window.location="../BackwardStage/Index.aspx";
}
}
else{
window.alert("您所请求的页面有错误!");
}
}
返回结果处理函数是以上! 在本地是可以,但是上服务器后 一直都是 “您所请求的页面有错误!” 为啥呢 !!! 跪求 !!!
{
window.location="../BackwardStage/Index.aspx";
}==========》是不是路径问题 if(xmlhttp.responseText=="success"&&"3")
{
window.location="~/BackwardStage/Index.aspx";
}
function AjaxValitedLogin(){
creatxmlhttp();
if (!xmlhttp) {
alert("不能创建XMLHttpRequest对象实例!");
return false;
}
if(CheckUserName()&&CheckPassword()&&CheckAuth())
{
xmlhttp.open("POST", "../BackwardStage/BackHandler.ashx?handlertype=ValitedLogin&login_Name="+ login_Name +"&login_Password="+ login_Password +"", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send(null);
xmlhttp.onreadystatechange = exechtloginjs; ///////返回结果处理函数exechtloginjs
}