/*//简单的弹出提示窗口
function()
{
Ext.MessageBox.alert('Hello','Welcome to my home!');
}*/
/*//弹出窗口
function()
{
var win=new Ext.Window({title:'hello',width:300,height:200,html:"<input value='hello'/>"});
win.show();
}*/
/*//元素打开后颜色渐变
function()
{
Ext.get('bodyid').highlight();
}*/
/*//选中元素
function() {
Ext.select('p').highlight();
}*/
/*//给控件添加事件
function()
{
Ext.select('p').on('click',function(e){Ext.get(e.target).highlight();});
}*/
/*//panel面板
function()
{
var my_panel = new Ext.Panel({
title: 'Panel',
width:500,
height:300,
buttons:[{text:'Button'}],
html:'<h2>This is a panel.</h2>',
tbar:[{text:'Top toolbar'}],
bbar:[{text:'Bottom toolbar'}]
});
my_panel.render(paneldiv);
}*/
/*//tabpanel
function()
{
var tabpanel=new Ext.TabPanel(
{
width:300,height:200,
items:[
{title:"面板1",height:30,html:'sdfsdfsdf'},
{title:"面板2",height:30,html:'dsfsdfsdfsdfsdfsdfsdf'}
]
}
);
tabpanel.render('paneldiv');
}*/
/*//面板添加tools:save,help,close
function()
{
new Ext.Panel(
{
renderTo:'paneldiv',
title:'hello',
width:300,
height:200,
html:'<h1>hello,open source</h1>',
tools:[
{id:"save"},
{id:"help",handler:function(){Ext.MessageBox.alert('help','请帮助我..............!');}},
{id:"close",handler:function(){Ext.Msg.alert('提示','关闭');Ext.get('paneldiv').innerHtml='';}}
],
tbar:[{pressed:true,text:'刷新'}]
}
)
}*/
/*//面板工具条中加入按钮、文本、空白、填充条、分隔符
function()
{
var panel=new Ext.Panel({title:"hello",width:300,height:200,html:'<h1>aaaaaaaaa</h1>',
tbar:[//new Ext.Toolbar.TextItem('工具条'),
{Button:'',text:'Button'},
{TextItem:'',text:'工具条'},
{pressed:true,text:'添加'},
{xtype:"tbseparator"},
{pressed:false,text:"保存"},
{Spacer:'dd',text:"Spacer"},
{Separator:'',text:'Separator'}
]
});
panel.render('paneldiv');
}*/
/*//提示窗口
function()
{
Ext.get("btn").on("click",function(){
//Ext.MessageBox.confirm("请确认","是否真的要删除指定内容",function(button,text)//返回值是yes或no
//Ext.MessageBox.prompt("请确认","是否真的要删除指定内容",function(button,text)//返回值是ok或cancel
Ext.MessageBox.show({title:"请确认",msg:"是否真的要删除指定内容",buttons:Ext.Msg.YESNOCANCEL,fn:function(button,text)//返回值是yes、no或cancel
{
alert(button);
if(button=="yes")
{
//删除操作
alert('删除成功!'+text);
}
}
})
});
}*/