Jquery请求API,AJax,Post,Get提交,失败,错误的处理


参考地址:https://api.jquery.com/jQuery.post/

Jquery get请求 $.get()

Jquery post请求 $.post

Jquery post请求失败:.fail

JavaScript 全选
// Assign handlers immediately after making the request,
// and remember the jqxhr object for this request
var jqxhr = $.post("example.php",
function() {
	alert("success");
}).done(function() {
	alert("second success");
}).fail(function() {
	alert("error");
}).always(function() {
	alert("finished");
});

// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
	alert("second finished");
});
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
管理员
上一篇:Javascript JS日期格式化显示
下一篇:Jquery请求API,AJax,Post,Get提交,失败,错误的处理
评论列表

发表评论

评论内容
昵称:
关联文章

PVE硬盘对应SATA口查询

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码