我有一种情况,我需要在同一个 ASP 按钮上同时弹出警报和确认弹出窗口。我需要提醒验证,一旦用户输入所有必要的信息,我需要确认弹出来发送电子邮件或提交另一个条目。
我已经在使用 jQuery 对话框弹出来进行警报和确认,但不知道如何将它们组合在同一个按钮上。
//我的确认码
<script type="text/javascript">
jQuery(function() {
var dlg = jQuery("#dialog").dialog({
draggable: false,
autoOpen: false,
minHeight: 10,
minwidth: 10,
zIndex: 99999
});
$('#<%=btnStart.ClientID%>').click(function() {
$('#dialog').dialog('open');
});
$(".ui-dialog-titlebar").hide();
$(".ui-dialog-titlebar-close").hide();
dlg.parent().appendTo(jQuery("form:first"));
});
<asp:Button id="btnStart" runat="server" Text="btnStart" onclick="btnStart_Click" />
<div id="dialog" style="text-align: center; display: none;font-size:14px;">
<table>
<tr>
<td colspan="2">
<asp:Label Text="Do you want to exclude these dates?" runat="server" ID="lbl"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnOk" runat="server" Text="Yes" OnClick="btnOK_Click" Style="width: 60px;" />
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="No" OnClick="btnCancel1_Click" Width="60px" />
</td>
</tr>
</table>
</div>
//我的警报弹出窗口
$(document).ready(function() {
$('#<%=btnStart.ClientID%>').click(function() {
alert("Correct it!");
});
});
这是.net 网络应用程序。