jQuery AJAX 方法

jQuery serializeArray() 方法

阅读(294)

实例 Run this code » 输出以数组形式序列化表单值的结果: $("button").click(function(){ x=$("form").serializeArray(); $.each(x, function(i, f...

jQuery serialize() 方法

阅读(309)

实例 Run this code » 输出序列化表单值的结果: $("button").click(function(){ $("div").text($("form").serialize()); }); 定义和用法 serialize(...

jQuery load() 方法

阅读(312)

实例 Run this code » 把文件 "demo_test.txt" 的内容加载到指定的 <div> 元素: $("button").click(function(){ $("#div1").load("demo_tes...

jQuery ajaxSuccess() 方法

阅读(318)

实例 Run this code » 当 AJAX 请求成功完成时,触发一个提示框: $(document).ajaxSuccess(function(){ alert("AJAX 请求完成"); }); 定义和用法 ajaxSuccess...

jQuery ajaxStop() 方法

阅读(295)

实例 Run this code » 当所有 AJAX 请求完成时,触发一个提示框: $(document).ajaxStop(function(){ alert("所有 AJAX 请求已完成"); }); 定义和用法 ajaxStop()...

jQuery ajaxStart() 方法

阅读(335)

实例 Run this code » 当 AJAX 请求开始时,显示 "loading" 的指示: $(document).ajaxStart(function(){ $(this).html("<img src='demo_wait...

jQuery ajaxSend() 方法

阅读(311)

实例 Run this code » 当 AJAX 请求即将发送时,改变 <div> 元素的内容: $(document).ajaxSend(function(e,xhr,opt){ $("div").append("Reque...

jQuery ajaxError() 方法

阅读(330)

实例 Run this code » 当 AJAX 请求失败时,触发一个警告框: $(document).ajaxError(function(){ alert("一个错误发生!"); }); 定义和用法 ajaxError() 方法规定 ...

jQuery ajaxComplete() 方法

阅读(276)

实例 Run this code » 当 AJAX 请求正在进行时显示 "loading" 的指示: $(document).ajaxStart(function(){ $("#wait").css("display","block"); ...

jQuery post() 方法

阅读(338)

实例 1 Run this code » 使用 HTTP POST 请求从服务器加载数据: $("button").click(function(){ $.post("demo_test.html",function(data,status...