1
在下面的對話形式,我有2個按鈕:保存&取消。當用戶雙擊保存按鈕時,我的數據被張貼2次。我怎樣才能避免它?我的數據發佈2次在我的jQuery的對話框
$(this).dialog({
modal: true,
resizable: false,
title: "Edit",
close: function() { $(this).dialog('destroy').remove(); },
buttons: {
"Save": function() {
// Manually submit the form
var form = $('form', this);
$(form).submit();
},
"Cancel": function() { $(this).dialog('destroy').remove(); }
}
});
謝謝。
謝謝尼古拉。 – Bronzato 2012-03-30 09:17:21