登录form php一个页面跳转页面,Extjs4中表单登录功能、登录成功跳转页面的代码...
本節(jié)內(nèi)容:
Extjs4實現(xiàn)的表單登錄功能,登錄成功跳轉(zhuǎn)頁面。
例子:
復(fù)制代碼 代碼示例:
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.create('Ext.form.Panel',{
title:'form2',
width:300,
height:200,
frame:true,
renderTo:'formDemo',
defaultType:'textfield',
defaults:{
allowBlank:false,
labelWidth:60,
width:240,
msgTarget:'side'
},
items:[{
name:'userName',
fieldLabel:'Name'
},
{
name:'password',
fieldLabel:'Pass'
}],? // www.jbxue.com
buttons:[{
text:'提交',handler:function(){
var basic=this.up('form').getForm();
basic.submit({
url:'/Extjs4/formAction!getForm.action',
method:'POST',
success:function(form,action){
location.href="/Extjs4/demo.html";
},
failure:function(form,action){
var data=action.response.responseText;
var json = eval("("+data+")");
Ext.Msg.alert('提示',json.message);
}
});
}
},
{text:'重置',handler:function(){
this.up('form').getForm().reset();
}
}
]
});
});
您可能感興趣的文章:
總結(jié)
以上是生活随笔為你收集整理的登录form php一个页面跳转页面,Extjs4中表单登录功能、登录成功跳转页面的代码...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php 上传 tmp_name 空,PH
- 下一篇: php文件安全实现方法,php安全下载大