Ext.onReady(function(){
// basic tabs 1, built from existing content
var tabs = new Ext.TabPanel({
renderTo: 'tabs1',
width:450,
activeTab: 0,
frame:true,
defaults:{autoHeight: true},
items:[
{contentEl:'script', title: 'Short Text'},
{contentEl:'up', title: 'Long Text'}
]
}); // second tabs built from JS
var tabs2 = new Ext.TabPanel({
renderTo: document.body,
activeTab: 0,
width:600,
height:250,
plain:true,
defaults:{autoScroll: true},
items:[{
title: 'Normal Tab',
html: "My content was added during construction."
},{
title: 'Ajax Tab 1',
autoLoad:'ajax1.htm'
},{
title: 'Ajax Tab 2',
autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
},{
title: 'Event Tab',
listeners: {activate: handleActivate},
html: "I am tab 4's content. I also have an event listener attached."
},{
title: 'Disabled Tab',
disabled:true,
html: "Can't see me cause I'm disabled"
}
]
}); function handleActivate(tab){
alert(tab.title + ' was activated.');
}
});如上这段代码,怎么加载不了页面?
// basic tabs 1, built from existing content
var tabs = new Ext.TabPanel({
renderTo: 'tabs1',
width:450,
activeTab: 0,
frame:true,
defaults:{autoHeight: true},
items:[
{contentEl:'script', title: 'Short Text'},
{contentEl:'up', title: 'Long Text'}
]
}); // second tabs built from JS
var tabs2 = new Ext.TabPanel({
renderTo: document.body,
activeTab: 0,
width:600,
height:250,
plain:true,
defaults:{autoScroll: true},
items:[{
title: 'Normal Tab',
html: "My content was added during construction."
},{
title: 'Ajax Tab 1',
autoLoad:'ajax1.htm'
},{
title: 'Ajax Tab 2',
autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
},{
title: 'Event Tab',
listeners: {activate: handleActivate},
html: "I am tab 4's content. I also have an event listener attached."
},{
title: 'Disabled Tab',
disabled:true,
html: "Can't see me cause I'm disabled"
}
]
}); function handleActivate(tab){
alert(tab.title + ' was activated.');
}
});如上这段代码,怎么加载不了页面?
解决方案 »
- 如何实现点<input type="file" name="file1" id="file1">浏览图显示问题
- jquery设置下拉框选中状态???
- 奇怪的onchange问题
- 像这种代码,能否通过变量使JavaScript更加简练?
- 如何用js判断展示广告显示在页面上的位置
- 请问,我想判断整个句子是否为一个空格,或者全角空格?当空格后面有其他字符的时候不算
- 救急,为什么下面的程序只能安装office 2000里的owc后才能正确显示?
- 求InterDev的下载地址,急!(听说是写javascript最好的)谢谢
- 我想单击某一个链接后,改变下拉列表的选项!
- 怎样使子窗口未关闭前不能操作父窗口
- 通过RadioButtonList的选择实现对层的显示与隐藏,请高手多多指点!
- (新手上路,求回答……)jsp中怎样设置table在ie单个页面内的最大行数
<div id="tabs1"></div>
<div id="script"></div>
<div id="up"></div>