开发者

ajax xhr object status

开发者 https://www.devze.com 2023-03-30 22:35 出处:网络
I have a weird problem, that thexmlhttpDelUser.status is never being received 200 in a simple html file on my local machine, but the same code works in my google chrome app.

I have a weird problem, that the xmlhttpDelUser.status is never being received 200 in a simple html file on my local machine, but the same code works in my google chrome app. Request is made to a remote server i.e. twitter.

Any guess?

Thanks for help.


xmlhttpDelUser=new XMLHttpRequest();
xmlhttpDelUser.onreadystatechange=function()
{   
    if (xmlhttpDelUser.readyState==4 && xmlhttpDelUser.status==200)
    {   
        xmlTreeDelUser=xmlhttpDelUser.responseText;
        alert(xmlTreeDelUs开发者_高级运维er);
        document.getElementById("res").innerHTML="hell";    
    }   
}
0

精彩评论

暂无评论...
验证码 换一张
取 消