Fork me on GitHub
欢迎第位访客!

摘要: 0:初始化,XMLHttpRequest对象还没有完成初始化 1:载入,XMLHttpRequest对象开始发送请求 2:载入完成,XMLHttpRequest对象的请求发送完成 3:解析,XMLHttpRequest对象开始读取服务器的响应 4:完成,XMLHttpRequest对象读取服务器响应 阅读全文
posted @ 2017-05-11 19:39 彭蒙善 阅读(417) 评论(0) 推荐(0) 编辑
摘要: ar xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(){ if( xhr.readyState == 4){ if( xhr.status >= 200 && xhr.status < 300 || xhr.status == 304){... 阅读全文
posted @ 2017-05-11 19:36 彭蒙善 阅读(5906) 评论(0) 推荐(0) 编辑
摘要: 简单小案例: $("input").click(function() { $.get("test.txt",function(data){ $("h1").html(data); }); }); JQuery中,$.get()表示发出了一个异步的get请求; 语法: $.get(路径?k=v&k=v 阅读全文
posted @ 2017-05-11 19:33 彭蒙善 阅读(251) 评论(0) 推荐(0) 编辑