我希望用户通过jQuery UI对话框确认当单击mailto链接时他或她接受或拒绝某些条款。当我使用下面的代码时,对话框会短暂出现,但随着页面被重定向到默认的电子邮件程序,会自动关闭。如何强制jQuery对话框等待响应
的jQuery:
$(function() {
.html('Do you accept these terms?')
.dialog({
autoOpen: false,
title: 'Disclaimer',
resizable: false,
width: 500,
modal: true,
buttons:
{
"Accept": function() {
$(this).dialog("close");},
"Reject": function() {
$(this).dialog("close"); }
}
});
$('.email-address').click(function() {
$dialog.dialog('open');
});
});
HTML:
<a class="email-address" href="mailto:'[email protected]">[email protected]</a>
上要求对话框之前响应的最佳方法有什么建议可以关闭?
工作正常。谢谢! – Ken