例如,有一个父界面A.html;一个子界面B.html;如何用Extjs在A.html点添加,弹出B.html子页面。 new Ext.window()

解决方案 »

  1.   

    window里面加属性 
    autoLoad:{url:'B.html',scope:this}
      

  2.   

    var maywin;
    button.on('click', function(){
            // create the window on the first click and reuse on subsequent clicks
            if(!mywin){            mywin = new Ext.Window({
                    layout: 'fit',
                    title: 'GMap Window',
                    closeAction: 'hide',
                    width:400,
                    height:400,
                    x: 40,
                    y: 60,
                    items: {
                        xtype: 'panel',
                        html: '<iframe width=100% height=100% src=b.html>'
                    }
                });
                
            }
            
            mywin.show();
            
        });
      

  3.   


    A.html中的添加按钮添加一个事件,window.open('b.html');
    b.html添加Ext.onReady函数,new Window即可
      

  4.   

    我试了下,这样写会如果设置的长度太长,头部会被被frame主框架给掩盖掉的