0
我有一個div包含確認對話框(是和否按鈕),我打開使用下面的jQuery。但如果點擊是,我需要去後面的代碼,如果沒有行動應該做。我試圖返回真假,但它不工作 ..please幫助我..JQuery對話框不返回代碼隱藏
jQuery(function ($) {
$('#<%=Gridview1.ClientID%> #confirm-dialog a[id*=lnkupdate]').click(function (e) {
e.preventDefault();
if (confirm("Are you sure you want to Update?")) {
//if yes button is clicked should go to codebehind
return true;
} else {
//if no button is clicked terminate the operation
return false;
}
});
});
當你點擊yes/no時會發生什麼? – Gavriel