【发布时间】:2013-11-20 01:53:48
【问题描述】:
下面是我用于模态弹出表单的代码
$("[id*=btnFinish").live("click", function () {
$("#timeLeft").dialog({
title: "There's Time Left!!",
open: function (event, ui) {
$(".ui-dialog-titlebar-close").hide();
},
modal: true,
draggable: false,
resizable: false
});
return false;
});
} else {
$("#timesUp").dialog({
title: "Time is up!",
open: function (event, ui) {
$(".ui-dialog-titlebar-close").hide();
},
modal: true,
draggable: false,
resizable: false
});
}
...
<div id="timesUp" style="display: none">
Click proceed to start the first exam module.
<br /><br />
<asp:Button ID="btnProce" runat="server" UseSubmitBehavior="false" Text="PROCEED" />
</div>
<div id="timeLeft" style="display: none">
You can go back, review your answers and change them if needed. Or you can continue to the next module and click Proceed.
<br /><br />
<asp:Button ID="btnBack" runat="server" UseSubmitBehavior="false" Text="BACK" />
<asp:Button ID="btnProceed" runat="server" UseSubmitBehavior="false" Text="PROCEED" />
</div>
在我后面的代码中,div="timeLeft" 拥有两个按钮 btnProceed 和 btnBack。 btnProceed 与div="timesUp" 中的btnProce 功能相同。现在,我的问题是当显示 div="timeLeft" 的模态弹出窗口并且当用户单击btnBack 时,我希望模态弹出窗口关闭并执行后面的代码。我真的不知道该怎么做。
【问题讨论】:
-
你用的是什么版本的jQuery?
-
这些是我的脚本: