想要让ExtJS 的 Field 有密码框只须要在TextField 中增加加 inputType: 'password' 属性即可.
1 var username = new Ext.form.TextField({
2 fieldLabel: 'UserName',
3 minLength: 4,
4 maxLength: 25,
5 allowBlank: false
6 });
7
8 var pass = new Ext.form.TextField({
9 fieldLabel: 'PassWorld',
10 minLength: 6,
11 maxLength: 30,
12 inputType: 'password', //密码
13 allowBlank: false
14 });
示例图