$(
function () {
$("#GetCoupon").click(
function () {
function del() {
var msg = "请确定领取吗?\n\n请确认!"
;
if (confirm(msg) ==
true) {
return true;
} else {
return false;
}
}
if (del()) {
var id = $(
this).attr("did"
);
$.ajax({
type: 'post'
,
url: '/Home/Get'
,
data: { "id"
: id },
success: function (msg) {
console.log(msg);
if (msg) {
alert("领取成功"
);
window.location.reload();
} else {
}
}
})
} else { alert("用户取消了领取"
); }
})
})
转载于:https://www.cnblogs.com/SeNaiTes/p/8819544.html
相关资源:JAVA上百实例源码以及开源项目
转载请注明原文地址: https://mac.8miu.com/read-56065.html