0
我正在使用此類來設置是/否警報。jquery確認操作不起作用
http://myclabs.github.io/jquery.confirm/
這是我的代碼:
var currentId;
$(".confirm").click(function() {
currentId = $(this).attr('id');
});
$(".confirm").confirm({
text: "Are you sure?",
confirm: function(button) {
//if I alert here currentId, it alerts right
$.post("receive.php", { currentId: "id"})
.done(function(data) {
alert(data); //NOTHING!!!
});
},
cancel: function(button) {
$('.modal hide fade').css("display", "none");
},
confirmButton: "Yes",
cancelButton: "No!",
post: true
});
});
Receive.php
<? echo $_POST['id']; ?>
問題是什麼? – 2013-05-14 15:19:25
你有太多'});'s – 2013-05-14 15:20:52