【发布时间】:2011-05-31 09:40:21
【问题描述】:
Simplemodal 完美运行,但我不知道如何在提交表单后自动关闭 iframe。 我试图使用 js 在模态选项之外获取事件,但是 如果我在提交事件上关闭模态窗口,则不会提交表单...
我还在输入按钮中添加了simplemodal-close类,但它在表单中不起作用??
有什么建议吗?? 这是我的代码
//模态窗口
modal.click(function(e){
e.preventDefault();
$.modal('<iframe src="' + this.href + '" height="480" width="525" style="border:0" >',{
containerCss:{
backgroundColor:"#fff"
},
overlayClose:true,
onShow: function (dialog) {
$("input",dialog.data).click(function (e) {
e.preventDefault();
alert('Here'); //Doesnt execute
$.modal.close();
parent.$.modal.close();
alert('Here');
});
}
});
【问题讨论】:
标签: iframe simplemodal