我有一個有搜索按鈕的asp.net網頁。當單擊按鈕時,會出現一個jquery對話框,用戶必須確認他們想要繼續或取消。如果他們點擊確認按鈕,搜索按鈕後面的c#代碼必須繼續執行,如果他們點擊取消,對話框必須關閉,沒有其他事情發生。我用來顯示模式彈出的jQuery如下在jQuery對話框中執行c#代碼單擊確定按鈕
$(document).ready(function() {
$("#<%=butSearch.ClientID%>").click(function (e) { // Button which will activate our modal
$('#modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
return false;
});
});
<div id="modal">
<div id="heading">
Search Notification
</div>
<div id="content">
<p>Please be aware that any search via the xxxx, will incur a cost. Do you wish to proceed?</p>
<a href="#" class="button green close"><img src="../../Imgs/dialog_tick.png">Proceed</a>
<a href="#" class="button red close"><img src="../../Imgs/dialog_cross.png">Cancel</a>
</div>
</div>
但是,什麼是實際* *問題? – MackieeE
什麼模式彈出與做什麼? – tariq
我的實際問題是如何讓我的代碼繼續執行模式彈出對話框上的確認按鈕被鎖住後 – user2768393