在iframe中弹出模态
|
您好,我正在使用jquery simplemodal在应用程序中创建模式框。我希望能够在iframe上方弹出模式,以使其变大而没有iframe滚动。
现在我的模态代码是这样的
function fullScreenChart(){
var pathname = window.location.href;
var modalHTML = \'<iframe src=\"\'+pathname+\'&bigchart\" width=\"820px\" height=\"520px\" frameborder=0 />\';
$.modal (modalHTML,{
closeHTML: \"<a href=\'#\' title=\'Close\' style=\'position:absolute; top:0px; right:6px;\' class=\'simplemodal-close\'>Close</a>\",
overlayCss: {
backgroundColor: \'#000\',
cursor: \'wait\'
},
containerCss: {
height: 520,
width: 820
}})
}
有什么方法可以利用.parent()或其他方式使iframe脱离模式。这样我也可以设定高度和宽度百分比。
没有找到相关结果
已邀请:
1 个回复
邵酮
函数简单地放在父页面中,然后从iframe调用它,如下所示: