摘要: 1 //1.创建Ajax对象,已经封装好的函数: 2 function createXHR(){ 3 if (typeof XMLHttpRequest != "undefined"){ 4 return new XMLHttpRequest(); 5 } else if (typeof ActiveXObject != "undefined"){ 6... 阅读全文
posted @ 2016-08-24 23:30 Scott-Jeremy 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1 xhr.onreadystatechange = function(){ 2 if (xhr.readyState == 4){ 3 if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304){ 4 alert(xhr... 阅读全文
posted @ 2016-08-24 23:29 Scott-Jeremy 阅读(419) 评论(0) 推荐(0) 编辑