function readyDo() {
//            alert(xhr.readyState + "分" + xhr.Status);
            if (xhr.readyState==4 && xhr.status==200 ) {
                var result = xhr.responseText;
                if (result == "true") {
                    document.getElementById("title").innerHTML = "";
                    return true;
                } else {
                    document.getElementById("title").innerHTML = "该用户名存在啦";
                    return false;
                }
            } 
        }
这串代码是判断返回的状态是否通过,注意status==200,s小写在IE,谷歌,欧朋都没有问题,
你只要Status==200,S大写,只能在ie浏览器中通过,其余浏览器都不能通过,而且通过本人
二天的判断在IE浏览器中,readyState和Status返回值是4和200,但是在谷歌或者欧朋浏览中
返回的值readyState==4 status==undefined,但是还是可以通过判断

转载自:http://www.aspnetjia.com

相关文章:

  • 2021-07-16
  • 2021-12-07
  • 2022-01-31
  • 2022-01-23
  • 2022-01-06
  • 2021-05-08
  • 2022-12-23
猜你喜欢
  • 2022-01-10
  • 2022-12-23
  • 2021-12-26
  • 2022-01-30
  • 2022-01-29
  • 2022-01-08
相关资源
相似解决方案