摘要: 遇到的问题先给大家看段ajax代码,大家觉得有没有什么问题?var xhr = new XMLHttpRequest();xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 302) { //to something } }};xhr.open("get", "/redirect", true);xhr.send();代码的本意很简单:就是发送ajax请求,如果返回的结果是状态码是302,就进行接下来的逻辑。看似没有问题吧,但我可以很负 阅读全文
posted @ 2013-06-09 15:59 lengyuhong 阅读(5189) 评论(0) 推荐(0) 编辑