jQuery 对话框在同一页面中打开链接
我有一个带有 2 个按钮“取消”和“打开”的对话框,当我单击“打开”时,我想在同一页面中加载一个网址。
这是我的代码:
$("#delete_wind").dialog({ autoOpen: false })
$( "#delete_wind" ).dialog({
resizable: false,
height:'auto',
width:350,
modal: true,
buttons: {"OPEN Message": function() {
url=('mailbox.php?id='+jQuery.data(document.body, 'elimina_id'));
**HOW OPEN URL??????**
$( this ).dialog( "close" );
},
"Annulla": function() {
$( this ).dialog( "close" );
}
}
});
I have a dialog with 2 buttons 'cancel' and 'open', when I click on open I would like to load a url in the same page.
This is my code:
$("#delete_wind").dialog({ autoOpen: false })
$( "#delete_wind" ).dialog({
resizable: false,
height:'auto',
width:350,
modal: true,
buttons: {"OPEN Message": function() {
url=('mailbox.php?id='+jQuery.data(document.body, 'elimina_id'));
**HOW OPEN URL??????**
$( this ).dialog( "close" );
},
"Annulla": function() {
$( this ).dialog( "close" );
}
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么,您只需设置
window.location.href
属性即可:Well, you can just set the
window.location.href
attribute:如果您想在对话框中打开 URL,请尝试以下操作:
If you want to open the URL inside the dialog, try this: