ajax请求组件

jQuery.ajax({
			type : 'POST',
			url : "${base}/reservation/create",
			//contentType : "application/json",
			data : jQuery("#reservation_form").serialize(),
			//data: {"method":"measuring"},
			complete: function(XMLHttpRequest, textStatus){

				//HideLoading();
			},
			success: function(data, textStatus) {
				if (data) {
					if (data.success == "true") {
						alert(data.info);
						document.location.href = "${base}/reservation/list";
					} else {
						alert(data.info);
					}
				}
			},
			error: function(){
				//出错处理
			}
		})	

你可能感兴趣的:(ajax请求组件)