<body>
<script type="text/javascript" language="javascript">
function allFunction(){
init();
initTabPanel()
}
function init()
{
new Ext.Viewport({
layout:'border',
items:[
{region:'north',
html:'n',title:'北',height:100,collapsible:true,
split:true,minSize:50,maxSize:150},
{region:'south',html:'s',title:'南',height:100,collapsible:true},
{region:'west',contentEl:"div_west",title:'西',width:200,collapsible:true},
{region:'east',contentEl:"div_east",title:'东',width:200,collapsible:true},
tabPanel
]
});
}
var tabPanel;
function initTabPanel()
{
tabPanel = new Ext.TabPanel({
region:"center",
activeTab:1,
enableTabScroll:true,
items:[
{
id:1,
title:"百度",
closable:true,
html:"<iframe src='http://www.baidu.com' width='100%' height='1000px'></iframe>"
},
{
id:2,
title:"谷歌",
closable:true,
html:"<iframe src='http://www.google.com' width='100%' height='1000px'></iframe>"
}
]
});
}
Ext.onReady(function(){allFunction();});
</script>
<div id="div_west"></div>
<div id="div_east"></div>
</body>页面运行时报错:'events'为空或不是对象。不知道什么地方出错了!
<script type="text/javascript" language="javascript">
function allFunction(){
init();
initTabPanel()
}
function init()
{
new Ext.Viewport({
layout:'border',
items:[
{region:'north',
html:'n',title:'北',height:100,collapsible:true,
split:true,minSize:50,maxSize:150},
{region:'south',html:'s',title:'南',height:100,collapsible:true},
{region:'west',contentEl:"div_west",title:'西',width:200,collapsible:true},
{region:'east',contentEl:"div_east",title:'东',width:200,collapsible:true},
tabPanel
]
});
}
var tabPanel;
function initTabPanel()
{
tabPanel = new Ext.TabPanel({
region:"center",
activeTab:1,
enableTabScroll:true,
items:[
{
id:1,
title:"百度",
closable:true,
html:"<iframe src='http://www.baidu.com' width='100%' height='1000px'></iframe>"
},
{
id:2,
title:"谷歌",
closable:true,
html:"<iframe src='http://www.google.com' width='100%' height='1000px'></iframe>"
}
]
});
}
Ext.onReady(function(){allFunction();});
</script>
<div id="div_west"></div>
<div id="div_east"></div>
</body>页面运行时报错:'events'为空或不是对象。不知道什么地方出错了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货