在父页面里
<div id="modalDialog">
<iframe id="modalDialogIframe" scrolling="auto" frameborder="0" style="width:100%;height:100%;"></iframe>
</div>
function openDialog(){
$('#modalDialog').dialog({
title: $("#modalDialog").attr("title"),
width: $("#modalDialog").width(),
height: $("#modalDialog").height(),
closed: true,
cache: false,
resizable:true,
modal: true
});
$("#modalDialog").dialog("center");
$("#modalDialog").dialog("open");
}
在 iframe 子页面里
$("#modalDialog",window.parent.document).width(1400);
$("#modalDialog",window.parent.document).height(600);
$("#modalDialog",window.parent.document).attr("title","dialog标题");
$("#modalDialog iframe",window.parent.document).attr("src","user/toAllotGuarantee?usrId="+rowData.usrId);
window.parent.openDialog();