jquery from提交和post提交

//from 提交

 function login(){
    $('#login_form').form('submit',{
              url: '../../../bagechuxing/customer/doLoginRegister',
              onSubmit: function(param){
                  return $(this).form('validate');
              },
              success: function(result){
               var result = eval('(' + result + ')');
                  if (result.code=="10000"){
                   var cusid = result.data.id;
                   window.location.href= '../../../bagechuxing/jsp/appLogin/applq.html?cusid='+cusid;
                   return;
                  }
                  if(result.code=="10001"){
                   $("#text01").text(result.message);
                   return;
                  }
              }
          });
  }

//post

 

 function lingqu(){
  var path = '../../../bagechuxing/customer/lingquactivityredpackets';
  var params = $.param({ "customeid": customeids});
  $.post(path,params,function(result){
   var result = eval('(' + result + ')');
   if (result.code=="10000") {

 //此处可以打开修改页面进行加载数据

  //$('#fmRuleEdit').form('load',result.rule);
    $("#text01").text(result.message);
    $("#packnum").val(result.data);
             return;
   }else{
    $("#text01").text(result.message);
             return;
   }
  });
 }

posted @ 2016-12-30 14:16  JLCUI  阅读(1679)  评论(0编辑  收藏  举报