extjs window js引入问题
現(xiàn)在使用的版本
extjs3.3.1
在extjs中window加載的是一個(gè)jframe,而iframe中引入了js,在這個(gè)時(shí)候js不能運(yùn)行,但是在火狐中是OK的,在IE6.0(開(kāi)發(fā)中一般會(huì)使用IE6.0)不可以加載js,
這個(gè)問(wèn)題需要你加載完成之后重新reload()一下即可
var myHtml='<iframe id="ifrm008" name="ifrm008" scrolling="auto" frameborder="0" width="100%"height="100%" src="/his/inpatient!detailUI.action{0}"></iframe>'; myHtml=myHtml.replace('{0}',params); // alert(myHtml); 測(cè)試打印輸出 //new 窗體顯示結(jié)果 this.detailWin=new top.Ext.Window({ title: "醫(yī)院住院病人住院明細(xì)", layout:'fit', height: 600, width: 800, closeAction:'hide', plain: true, modal : true, listeners:{ afterrender:function(window){ //加載數(shù)據(jù),刷新數(shù)據(jù) //alert(top.frames['ifrm001'].location); top.frames['ifrm008'].location.reload(); //var mysrc=self.document.getElementById('ifrm001').src; //document.getElementById('ifrm001').src=mysrc; } }, html : myHtml });上面replace('{0}',params);是參數(shù);
在以上代碼中在IE和火狐中運(yùn)行都是OK的,top.frames['ifrm008'].location.reload();用這個(gè)進(jìn)行重新加載顯示頁(yè)面,extjs加載后js不會(huì)執(zhí)行,所以需要使用reload重新加載窗體
轉(zhuǎn)載于:https://www.cnblogs.com/spring4/archive/2012/05/03/2483691.html
總結(jié)
以上是生活随笔為你收集整理的extjs window js引入问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 免费图标下载:100个手绘的PSD图标
- 下一篇: pyc相关