Ext from表單

function() {ide

Ext.onReady(function() {this

var testForm=Ext.widget({spa

xtype:'form',orm

layout:'form',get

collapsible:true,it

id:'testForm',io

frame:true,function

title:'testForm',form

width:400,test

bodyPadding:'5 50 5 5',

fieldDeafults:{

msgTarget : 'side',

labelAlign:'right'

},

defaultType:'textfield',

items:[{

fieldLabel:'name',

labelAlign: 'left',

labelWidth: 50,

name:'name',

allowBlank : false

},

{

fieldLabel:'date',

xtype : "datefield",

labelAlign: 'left',

labelWidth:10,

name:'name',

},

{

fieldLabel:'number',

xtype : "numberfield",

labelAlign: 'left',

labelWidth:10,

name:'name',

}

,

{

fieldLabel:'time',

xtype : "timefield",

labelAlign: 'left',

labelWidth:10,

name:'time',

}],

buttons:[{

text:'save',

handler:function(){

alert(this.up('form').getForm().isValid());

alert("x");

var fromValues=testForm.getForm().getValues();

alert(fromValues.time);

}

},{

text:'cancel'

}]

})

testForm.render(document.body);

});

})();

相關文章
相關標籤/搜索