extjs定义form表单对象

var form1 = new Ext.form.FormPanel(

{ width:350,

frame:true,

renderTo:"form1",

title:"FormPanel",

bodyStyle:"padding:5px 5px 0",

defaults:{width:200,xtype:"textfield"},//*****简化****//

items:[ { fieldLabel:"UserName", //xtype:"textfield",

name:"user",

id:"user",

//width:200 },

{ fieldLabel:"PassWord", //xtype:"textfield",

name:"pass",

id:"pass",

inputType:"password",

//width:200 } ],

buttons:[{text:"确定"},{text:"取消",handler:function(){alert();}}]

你可能感兴趣的:(ExtJs)