Ext.onReady(function(){
var formPanel = new Ext.FormPanel({
id: 'vali',
labelWidth: 75, // label settings here cascade unless overridden
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{id: 'username',fieldLabel: '用户名',name:'username',allowBlank: false,blankText: '必填'},
{id: 'password', fieldLabel: '密 码',name:'password'}]
})
var win = new Ext.Window({
title:'请登录',
width:380,
autoHeight: 'true',
resizable: false,
modal:true,
closeAction: 'hide',
buttonAlign:'center',
items:formPanel,
buttons:[{text: '确定',handler: function(){alert('确定')}},{text: '取消',handler: function(){win.hide()}},
{text: '重置',handler: function(){
Ext.getCmp('username').setValue("")
Ext.getCmp('password').setValue("")
}}]
})
win.show()
})
复制到ExtJS环境下,就可以运行,
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)