阅读背景:

ExtJs,从不同版本的iframe创建窗口,正确设置高度

来源:互联网 

Here is a code:

这是一个代码:

<script language="javascript" type="text/javascript">
    function resizeIframe(obj) {
        obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
    }
    Ext.onReady(function () {
        var userIdeaPopupCfg  = {
            layout:'fit',
            id: 'feedbackWindow',
            title: 'some title',
            width: 800,
            border: false,
            modal: true,
            resizable: false,
            items: {
                xtype: 'box',
                autoEl: {
                    tag: 'iframe',
                    src: "extJsIframe.html",
                    scrolling: "no",
                    onload: "javascript:resizeIframe(this);"
                }
            },
            buttons:[
                {
                    text: 'Ok Button',
                    id: 'okButton'
                },
                {
                    text: 'Cancel Button',
                    id: 'cancelButton'
                }
            ]
        };

        new Ext.Window(userIdeaPopupCfg).show();
    });
</script>
<script language="j



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: