当前位置: 代码迷 >> JavaScript >> extjs form交付表单
  详细解决方案

extjs form交付表单

热度:293   发布时间:2012-11-07 09:56:10.0
extjs form提交表单

function submit1(){
if(loginForm.form.isValid()){???
?? loginForm.form.doAction('submit',{
????? url:'loginAction.action',
????? method:'post',
????? success:function(form,action){
????? ??? alert("afsdfsdf");???? ???
????? var result=action.result.data;
?????
????? if(result=='a'){
?????? //跳转到高级管理员界面
????? ??? window.location.href = 'adminer.html';
????? }else if(result=='d'){
??????? //跳转到开发人员界面
????? ??? window.location.href = 'developer.html';
????? }else if(result=='t'){
????? ??? ?//跳转到测试人员界面
????? window.location.href = 'tester.html';
????? }else if(result=='p'){
????? ??? ?//跳转到项目经理界面
????? window.location.href = 'manager.html';
????? }else{???
?????? Ext.Msg.alert('错误',"用户名或密码错误");
????? }
???? },
???? failure:function(form,action){
???? ??? Ext.Msg.alert('错误',"用户名或密码错误");
???? }
??? });
}

  相关解决方案