sample.js

来自「java extjs开发的一个登陆项目」· JavaScript 代码 · 共 42 行

JS
42
字号
Ext.QuickTips.init();
Ext.onReady(function(){
	var win = new Ext.Window({
		width:400,
		height:300,
		title:"我的电脑",
		tools:[{
			id:"toggle",
			handler:function(e,t,p){
				
			},
			qtip:"hi, this is my computer!"
		}],
		tbar:[{
			text:"hhhh",pressed:true
		},new Ext.Toolbar.TextItem("hello"),
		new Ext.Toolbar.Spacer(),
		new Ext.Toolbar.Button({text:"button"})],
		bbar:[
		new Ext.Toolbar.TextItem("hello"),
		new Ext.Toolbar.Spacer(),
		new Ext.Toolbar.Button({text:"button"})]
	});
	win.show();
	win.getTopToolbar().add({text:"hhhh",pressed:true});
	win.getTopToolbar().add(new Ext.Toolbar.Separator());
	win.getTopToolbar().add(new Ext.Toolbar.Button({text:"button"}),new Ext.Toolbar.Spacer(),new Ext.Toolbar.Button({text:"button"}));

	
	
	var menu = new Ext.menu.Menu({
		items:[{
			text:"first"
		},"-",{
			text:"second"
		}]
	});
	win.getTopToolbar().add(new Ext.Toolbar.SplitButton({
		text:"splitButton",
		menu:menu
	}));
})

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?