参考地址:http://www.verydemo.com/demo_c113_i4844.html
ext form
提交问题 - Web 开发 / Ajax
Ext.BLANK_IMAGE_URL = 'script/resources/images/default/s.gif';
Ext.QuickTips.init();
var SysuserForm=new Ext.form.FormPanel({
//el:'SysuerForm',
defaultType:'textfield',
labelAlign:'right',
labelWidth:120,
frame:true,
width:200,
autoHeight:true,
waitMsgTarget:true,
items:[{
cls : 'user',
name:'userid',
fieldLabel:'用户名',
blankText:'用户名不能为空',
allowBlank:false
},{
cls : 'key',
inputType:'password',
fieldLabel: '密 码',
name: 'passwd',
blankText:'密码不能为空',
allowBlank:false
}],
buttons:[{
text:'登陆',
handler:submitValid
},{
text:'重置',
handler:function(){
SysuserForm.getForm().reset();
}
},{
text:'注册',
handler:function(){
document.forms[0].passwd.value="";
document.forms[0].userid.value="";
window.location.href="login.do";
}
}]
});
function submitValid(){
if(SysuserForm.form.isValid()){
document.forms[0].passwd.value = docum…………………………………………………………………………
Ext.BLANK_IMAGE_URL = 'script/resources/images/default/s.gif';
Ext.QuickTips.init();
var SysuserForm=new Ext.form.FormPanel({
//el:'SysuerForm',
defaultType:'textfield',
labelAlign:'right',
labelWidth:120,
frame:true,
width:200,
autoHeight:true,
waitMsgTarget:true,
items:[{
cls : 'user',
name:'userid',
fieldLabel:'用户名',
blankText:'用户名不能为空',
allowBlank:false
},{
cls : 'key',
inputType:'password',
fieldLabel: '密 码',
name: 'passwd',
blankText:'密码不能为空',
allowBlank:false
}],
buttons:[{
text:'登陆',
handler:submitValid
},{
text:'重置',
handler:function(){
SysuserForm.getForm().reset();
}
},{
text:'注册',
handler:function(){
document.forms[0].passwd.value="";
document.forms[0].userid.value="";
window.location.href="login.do";
}
}]
});
function submitValid(){
if(SysuserForm.form.isValid()){
document.forms[0].passwd.value = docum…………………………………………………………………………