Ext.onReady(function(){
//定义panel组件 var panel1 = new Ext.Panel({ frame: false, id: 'panel1', border: false, html:'panel1', bodyStyle: 'background-color: red', }); var panel2 = new Ext.Panel({ frame: false, border: false, html:'panel2' }); var panel3 = new Ext.Panel({ frame: false, border: false, html:'panel3' }); //将3个panel放在一个弹出层中 var w = new Ext.Panel({ renderTo: Ext.getBody(), frame: false, border: false, width:200, height:200, layout:'card', activeItem: 0, //要包含的组件 items:[panel1,panel2,panel3], }); w.show();
Ext.get("panel1").on('focus', function () { Ext.FocusManager.enable(); alert("focus"); }); Ext.get("panel1").on('click', function () { alert("click"); }); Ext.get("panel1").on('mouseover', function () { alert("mouseover"); }); Ext.get("panel1").on('blur', function () { alert("blur"); }); // w.layout.setActiveItem(1);
});
小伙看你根骨奇佳,潜力无限,来学PHP伐。