Extjs Panel中的buttons如何显示在panel的里面 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var panel = new Ext.Panel({ title: '标题', width: 400, height: 400, renderTo: Ext.getBody(), collapsible: true, // 折叠 titleCollapse: true, // 点标题栏可折叠 buttonAlign: 'center', // right/left //html: '<h1>主题内容</h1>', contentEl: 'content', bbar:[ new Ext.Toolbar.Button({ text: '文件', handler: function(){ Ext.Msg.alert('提示', '哈哈'); } }), new Ext.Toolbar.Separator(), new Ext.Toolbar.Spacer(), { text: '文件2', handler: function(){ Ext.Msg.alert('提示', '哈哈'); } }, new Ext.Toolbar.TextItem({ text: '文本信息' }), new Ext.Toolbar.Fill(), new Ext.Toolbar.SplitButton({ text: '编辑', menu: [ { text: '复制' }, { text: '粘贴' } ] }) ], buttons:[ { text: '提交', handler: function(){ } }, { text: '提交2' } ] }); 我理解楼主是想把button放到panel中的items里,楼上的方法button是在最底下的。如果放到items里就行了:button1 = new Ext.Button( { ...... }var panel = new Ext.Panel({......items: [ ...... { button1 }}); appendchild 生成空白节点怎么办? 端午节散分 动态加入URL参数 我写的一个函数,麻烦高手看下 两种js特效冲突怎么解决? 请问EXTJS为何接收到不到action传输的数据啊?! 简单问题——怎样在javaScript中把变量值打印出来? 如何获取form下的某个文本框是否聚焦? 请问 <base>在javascript中不起作用? 人人网底部工具栏的奥秘在哪? ExtJS editorgrid获取store的问题
title: '标题',
width: 400,
height: 400,
renderTo: Ext.getBody(),
collapsible: true, // 折叠
titleCollapse: true, // 点标题栏可折叠
buttonAlign: 'center', // right/left
//html: '<h1>主题内容</h1>',
contentEl: 'content',
bbar:[
new Ext.Toolbar.Button({
text: '文件',
handler: function(){
Ext.Msg.alert('提示', '哈哈');
}
}),
new Ext.Toolbar.Separator(),
new Ext.Toolbar.Spacer(),
{
text: '文件2',
handler: function(){
Ext.Msg.alert('提示', '哈哈');
}
},
new Ext.Toolbar.TextItem({
text: '文本信息'
}),
new Ext.Toolbar.Fill(),
new Ext.Toolbar.SplitButton({
text: '编辑',
menu: [
{
text: '复制'
},
{
text: '粘贴'
}
]
})
],
buttons:[
{
text: '提交',
handler: function(){
}
},
{
text: '提交2'
}
]
});
button1 = new Ext.Button(
{
......
}var panel = new Ext.Panel({
......
items: [
......
{
button1
}
});