extJs学习基础2

一个登陆界面:

extJs学习基础2

 1 Ext.onReady(function(){

 2 

 3             Ext.define('Login',  {  

 4                 //renderTo: Ext.getBody(),

 5                 extend: 'Ext.window.Window',  

 6                 closable: false,  

 7                 resizable : false,  

 8                 modal: true,  

 9                 //draggable: false,  

10                 autoShow: true,  

11                 title: '用户登录---OA办公系统',  

12                 items:[{  

13                     xtype:'form',//父窗体  

14                     reference: 'form',  

15                     bodyPadding: 20,  

16                     items:[{  

17                         xtype: 'textfield',  

18                         name: 'username',  

19                         labelWidth: 50,  

20                         fieldLabel: '用户名',  

21                         allowBlank: false,  

22                         emptyText: '用户名或邮箱地址'  

23                       },{  

24                         xtype: 'textfield',  

25                         name: 'password',  

26                         labelWidth: 50,  

27                         inputType: 'password',   

28                         fieldLabel: '密  码',  

29                         allowBlank: false,  

30                         emptyText: '请输入您的密码'  

31                       }]  

32                 }],  

33                 buttons: [{  

34                             name: 'registbutton',  

35                             text: '用户注册',    

36                           },{  

37                             name: 'loginbutton',  

38                             text: '用户登录',    

39                             region: 'center',  

40                             

41                           }]  

42               }  

43             ); 

44 

45             var log = new Login();

46             log.show();

 

你可能感兴趣的:(ExtJs)