DOC

extjs

By Pauline Long,2014-03-20 19:50
10 views 0
extjs

Ext.onReady(function (){

// å??æ‹?å?? {}ä??è?? ç?ºéŕ? ä??æ‹?å??[]

    ä??ç •é‡Œé??è??有ä??ä?ªåˆ?å?šä?ªå??è??

    // Ext.Msg.alert(";alert";);

/*

     var panel = new Ext.Panel(

     {

     id:'panel_hello',

     title:'hellotitle',

     width:200,

     height:200

     }

     )

     panel.render(";hello";);*/

     /*var viewport =new Ext.Viewport({

     id:'',

     layout:'border',

items:[{region:'north',height:50},{region:'west',width:200},{regio

    n:'center'}]

     })*/

     /*var window =new Ext.Window({title:'hello

    World',width:300,height:200,html:'<;h1>;hello<;/h1>;'});

     window.show();*/

     //viewportç??å…?çŗ?æ?•

/* new Ext.Viewport({

     enableTabScroll:true,

     layout:";fit";,

items:[{title:";é??æ??";,html:";";,bbar:[{text:";按éř?1";},{text:

    ";按éř?";}]}]

     });*/

     //å?Œç?Ţçš„å?Ţå??

/* new Ext.Viewport({

     enableTabScroll:true,

     layout:";border";,

     items:[

    {title:";é??æ??";,region:";north";,height:50,html:'<;h1>;ç?Řç??å?Ţå??ç??ç?†ç??ç?Ÿ<;/h1>;'},

    {title:";è?œå?•";,region:";west";,width:200,collapsible:true,html:";è?œå?•æ ?";},

    {xtype:";tabpanel";,region:";center";,items:[{title:";é??æ??1";},{

title:";é??æ??2";}]}

     ]

     });*/

    /* var panel =new Ext.TabPanel({width:400,height:300,items:[new Ext.Panel({title:";tab1";,height:30}),new

    Ext.Panel({title:";tab2";,height:30}),new

    Ext.Panel({title:";tab3";,height:30})]});

     panel.render(";hello";);*/

     //tab å??航

/* var panel2 = new

    Ext.TabPanel({width:300,height:200,items:[{title:";tab4";,height:30},{title:";tab5";,height:30},{title:";tab6";,height:30}]});

     panel2.render(";hello2";);*/

     //åŠ?æ??事ä??æ??åŠ

    /* Ext.get(";btnAlert";).addListener(";click";,a);

     Ext.get(";btnAlert";).addListener(";click";,a);*/

     //å??è?Ÿ2ç?řå??出

    /* Ext.get(";btnAlert";).on(";click";,a,this,{delay:2000}); */

/* var win = new Ext.Window({

     title:";æˆŘæ??出æ??æ‰Ŗé…?æ??çš„ï??";,

     width:300,

     height:200,

     html:'<;h1>;main<;/h1>;',

     tbar:[{pressed:true,text:'top toolbar'}],

     bbar:[{text:'botton toolbar'}],

     buttons:[{text:'footer'}]

     });

     win.show();

     win.on(";beforedestroy";,function(obj){

     obj.show();

     Ext.Msg.alert(";å…?éŕ??";,";æƒ?å…?éŕ?æˆŘ?ä? è??å•Š!";);

     return false;

     })*/

     //å?ºå??çš„ é??æ??功èƒ?

     /* new Ext.Panel({

     renderTo:";hello";,

     title:";hello";,

     width:300,

     height:200,

     html:'<;h1>;hello,easy open source<;/h1>;',

     tools:[

     {id:";save";},

     {id:";help";,handler:function(){Ext.Msg.alert('ww','ww')}},

     {id:";close";},

     ],

     tbar: [

     new Ext.Toolbar.TextItem('å??å…?æ ?'),

     {xtype:";tbfill";},

     {pressed:true,text:";æ??åŠ ";},

     {xtype:";tbseparator";},

     {pressed:true,text:";ä??å??";}

     ]

     });*/

/* new Ext.Panel({

     renderTo:";hello";,

     title:";tite";,

     layout:";column";,

     width:500,

     height:100,

     items:

     [

     {title:";columns1";,width:100},

     {title:";columns2";,width:100},

     {title:";columns3";,width:100},

     {title:";columns4";}

     ]

     });*/

     //columnså?ƒå??

     /*new Ext.Panel({

     renderTo:";hello";,

     title:";tite";,

     layout:";column";,

     width:500,

     height:100,

     items:

     [

     {title:";columns1";,columnWidth:.2},

     {title:";columns2";,columnWidth:.3},

     {title:";columns3";,columnWidth:.3},

     {title:";columns4";,columnWidth:.2}

     ]

     });*/

     //fitå?ƒå??

     /*new Ext.Panel({

     renderTo:";hello";,

     title:";title";,

     // layout:";fit";,

     width:500,

     height:500,

     items:

     [

     {title:";model1";,html:";model content1";},

     {title:";model2";,html:";model content2";},

     {title:";model3";,html:";model content3";}

     ]

     });*/

     //formå?ƒå??

     /* new Ext.Panel({

     renderTo:";hello";,

     title:";formå?ƒå??";,

     layout:";form";,

     width:300,

     height:200,

     defaultType:";textfield";,

     labelAlign:";right";,

     hideLabel:";false";,

     items:

     [

     {fieldLabel:";å?Ŗå??";,name:";name";},

     {fieldLabel:";åœ?å??";,name:";address";},

     {fieldLabel:";çŗµè??";,name:";tel";},

     {fieldLabel:";å…?ä?Ŕ";,name:";other";}

     ]

     });*/

     //form panel

/* new Ext.FormPanel({

     renderTo:";hello";,

     title:";form panel";,

     width: 240,

     height: 150,

     labelAlign:";right";,

     defaultType:";textfield";,

     items:

     [

     {fieldLabel:";å?Ŗå??";,name:";name";},

     {fieldLabel:";åœ?å??";,name:";address";},

     {fieldLabel:";çŗµè??";,name:";tel";},

     {fieldLabel:";å?‡æ??";,name:";other";}

     ]

     });*/

     //accordion å?ƒå??

     //é?ţå??ä??éŗ? é?ţå??å?Œç?Ţçš„accordionå?ƒå??

     /* new Ext.Panel({

     renderTo:";hello";,

     title:";accordionå?ƒå??";,

     width:300,

     height:400,

     layout:";accordion";,

     layoutConfig:{ animate:true },

     items:

     [

     {title:";panel1";,html:";content1";},

     {title:";panel2";,html:";content2";},

     {title:";panel3";,html:";content3";}

     ]

     });*/

/* new Ext.Panel({

     renderTo:";hello";,

     title:";table rowå?ƒå??";,

     width:500,

     height:400,

     layout:";table";,

     layoutConfig:{columns:3},

     items:

     [

     {title:";panel1";,html:";content1";,rowspan:2,height:100},

     {title:";panel2";,html:";content2";,colspan:2},

     {title:";panel3";,html:";content3";},

     {title:";panel4";,html:";content4";}

     ]

     });

     */

     //ç??ä??æ??创å?ºæ•?æ??

     /* var data=

     [

     [1,'EasyJWeb','å??EasyJF','www.easyjs.com'],

     [2,'jfox','å??huihoo','www,huihoo.org'],

     [3,'jdon','å?šjdon','www.jdon.com'],

     [4,'line163','å?Řline163','www.line163.com']

     ];*/

     //ç??二éƒ? 创å?ºæ•?æ??å??å‚?å??

Report this document

For any questions or suggestions please email
cust-service@docsford.com