在iframe中 使用jquery ui dialog,弹出后可以覆盖父窗体
///iframe中的jquery ui modal dialog 覆盖父窗口
function openDialog() {var $doc;if (window.location != window.parent.location) {// <SPAN style="COLOR: #ff0000">页面在iframe中</SPAN>$doc = window.parent.jQuery.noConflict(); } else {// <SPAN style="COLOR: #ff0000">页面单独打开</SPAN>$doc = jQuery.noConflict();
}
$doc("body").append('<div id=dialog></div>');var dialog = $doc("#dialog"); dialog.html("欢迎你"); dialog.dialog({ modal: true });
}