1

我想在 iframe 上显示一个 jquery 模式对话框,目前它位于 iframe 后面。那么如何在 iframe 上显示 jquery 模态对话框,并具有重新调整大小、拖动功能。

代码

<div id="dialog" title="Basic dialog">
    <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>

<iframe style="width: 99%; height: 759px;" src="http://unfccc.int/resource/docs/convkp/kpeng.pdf"></iframe>

jQuery/Javascript 代码

$(function () {
    $("#dialog").dialog({
        autoOpen: true,
        show: {
            effect: "clip",
            duration: 1000
        },
        hide: {
            effect: "clip",
            duration: 1000
        }
    });
});
4

0 回答 0