sys_obj = { create:function(){ Ext.create('Ext.form.Panel', {//创建表单面板 id:"form_show", fullscreen: true, items:[ { xtype: 'toolbar', docked: 'top', title:'密码修改', cls:'toolbar_new', items: [ { xtype: 'button', pressedCls:'back-button-pressed', cls:'back-button', handler:function(){ sys_goURL("./desk/desk.js"); } }, { xtype: 'spacer' }, { xtype: 'button', pressedCls:'save-button-pressed', cls:'save-button24', handler:this.save } ] }, { xtype: 'fieldset', items: [ { xtype: 'passwordfield', name: 'new_pwd', id:'new_pwd', label: '新密码:', }, { xtype: 'passwordfield', name: 'new_pwd2', id:'new_pwd2', label: '密码确认:', } ] } ] }); return Ext.getCmp("form_show"); }, save:function(){ var new_pwd = Ext.getCmp("new_pwd").getValue(); if(!new_pwd){ Ext.Msg.alert("提示","请输入新密码"); return; } var new_pwd2 = Ext.getCmp("new_pwd2").getValue(); if(!new_pwd2){ Ext.Msg.alert("提示","请输入确认密码"); return; } if(new_pwd != new_pwd2){ Ext.Msg.alert("提示","两次输入密码不一致"); return; } var params = Ext.getCmp("form_show").getValues(); sys_ajax("/org/default.do?method=save_pwd",params,function(json){ Ext.Msg.alert("提示",json.msg); }); } }