当前位置:编程学习 > JS >>

extjs window显示在顶层

 最开始的样式:

完成后的样式:

下面是代码:
 

[javascript] var win = new top.Ext.Window({ 
        title: menuReferenceObj.patientName+'--病历--'+menuReferenceObj.title, 
           layout:'fit', 
           height: 537, 
        width: 800, 
           closeAction:'close', 
           plain: true, 
           modal : true, 
           html : '<iframe id="ifrm" scrolling="auto" frameborder="0" width="100%"height="100%" src="/xxx/'+menuReferenceObj.patientNo+menuReferenceObj.code+'.html"></iframe>' 
       }); 
    win.show(this); 
 var win = new top.Ext.Window({
         title: menuReferenceObj.patientName+'--病历--'+menuReferenceObj.title,
            layout:'fit',
            height: 537,
         width: 800,
            closeAction:'close',
            plain: true,
            modal : true,
            html : '<iframe id="ifrm" scrolling="auto" frameborder="0" width="100%"height="100%" src="/xxx/'+menuReferenceObj.patientNo+menuReferenceObj.code+'.html"></iframe>'
        });
  win.show(this);
需要在加上top就OK了,但是需要注意,有时候会报找不到top.Ext.Window

你需要在Ext的代码里面写,

InpatientViewPanel=Ext.extend(Ext.grid.GridPanel,{


constructor:function(){


InpatientViewPanel.superclass.constructor.call(this,{});


},

showWindow:function(){

//上面粘贴的代码 这样写是OK的


}


});


 摘自 yhc13429826359的专栏

补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,