当前位置:博客展示

ajax代码范例

作者: 创建时间:2016-12-10 12:31:06
 $.ajax({
	url: url,
	type: "post",
	dataType: "json",
	data: data,
	beforeSend: function(xhr) {
		img.show().css({
			"position": "fixed",
			"top": "40%",
			"left": "45%",
			"margin-top": function() {
				return - 1 * img.height() / 2;
			},
			"margin-left": function() {
				return - 1 * img.width() / 2;
			}
		});
		mask.show().css("opacity", "0.1");
	},
	success: function(result) {
		doSuccess()
	},
	complete: function(xhr) {
		img.hide();
		mask.hide();
	}
});

原文链接:http://www.fastmvc.com/blog/1262.html

相关评论
<··>
Ctrl + Enter快速提交
提交
还没有评论,赶快来坐沙发吧!
博客达人
网站目录
首页 讨论中心 帮助手册 下载中心 站内博客 用户管理
友情链接
在线网页工具
声明
电话:18729480012 地址:西安市高新路18号凯创国际A1802号 西安爱迪科技 陕ICP备14010060号2014-2025 版权所有