浏览 1473 次
锁定老帖子 主题:ext做多个标签
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2008-07-14
<div id="jtabs"></div> 先在页面写一个DIV,定义他的ID,然后写JS代码如下 <script type="text/javascript"> var work = { init : function(){ var jtabs = new Ext.TabPanel('jtabs'); var scalarTabIframe = Ext.DomHelper.append(document.body, {tag: 'iframe',scrolling:'no',width:'999',height:'410',id:'scalarTab', frameBorder: 0}); var scalarTab = jtabs.addTab(scalarTabIframe.id, "日常"); scalarTab.on('activate',function(){ scalarTabIframe.src = "/abc.do?orgDataNodeRole=0&_="+(new Date()).getTime(); }); var rationTabIframe = Ext.DomHelper.append(document.body, {tag: 'iframe',scrolling:'no',width:'999',height:'410',id:'rationTab', frameBorder: 0}); var rationTab = jtabs.addTab(rationTabIframe.id, "定量"); rationTab.on('activate',function(){ rationTabIframe.src = "/cab.do?orgDataNodeRole=0&_="+(new Date()).getTime(); }); var activityTabIframe = Ext.DomHelper.append(document.body, {tag: 'iframe',scrolling:'no',width:'999',height:'410',id:'activityTab', frameBorder: 0}); var activityTab = jtabs.addTab(activityTabIframe.id, "定时"); activityTab.on('activate',function(){ activityTabIframe.src = "/dca.do?method=load&_="+(new Date()).getTime(); }); jtabs.activate(0); } } Ext.onReady(work.init, work, true); </script>
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |