zoukankan      html  css  js  c++  java
  • ajax中向HTML页面中指定位置添加信息

    $.ajax({
      type : "POST",
      beforeSend : function() {
       showLoader("数据加载中...");// 展示等待效果
      },
      complete : function() {
       //与后台通讯(查询是否存在有效保单)
        getComPlugin(successCallback,"com.sinosoft.hna.lpcx.LPSQJYSrarch",'searchSQJY',dates);
      }
     });

    function successCallback(result) {
     Timeout(200);//延时200毫秒关闭等待效果
     result = JSON.parse(result);
     var RiskCode=$("#riskCode").val();//险种编码
     //===============如果存在有效保单则可以进入申请页面进行理赔申请=============
     if (result[0].code == "success"){
      var jsonObj = JSON.parse(result[0].msg);
      var BdSerialNo=jsonObj[0].BdSerialNo;//保单号
      var IdNo=jsonObj[0].IdNo;//身份证号码
      var IdType=jsonObj[0].IdType;//证件类型
      var Name=jsonObj[0].Name;//姓名
      var zzDate=$("#date-1").val();
      zzDate=zzDate.substring(0,4)+"-"+zzDate.substring(4,6)+"-"+zzDate.substring(6,8);
      if (jsonObj[0].BdSerialNo!=""&&jsonObj[0].BdSerialNo!=null) {
       //将理赔所需信息带至理赔申请页面
       location.href = "XTGN_B01.html?&Name="+encodeURI(encodeURI(Name))+"&RiskCode="+RiskCode//Name  html

    页面中的标签名称  location.href ajax中重定向
       +"&BdSerialNo="+BdSerialNo+"&IdNo="+IdNo+"&IdType="+IdType+"&zzDate="+zzDate;
      }
     }else if(result[0].code == "error"){
      $("#showMessageA01").show();
      $("#showMessageA01").html(result[0].msg);
     }else if(result[0].code == "nosearch"){
      $("#showMessageA01").show();
      $("#showMessageA01").html(result[0].msg);
     } 
    }

  • 相关阅读:
    设计模式 之 单例模式
    leetcode 69 x 的平方根 牛顿迭代法
    leetcode 98 验证二叉搜索树
    leetcode 54 螺旋数组
    第一篇-python入门
    python-入门
    python
    线性判别分析LDA总结
    LDA
    线性判别分析(LDA)原理
  • 原文地址:https://www.cnblogs.com/qianyukun/p/4305562.html
Copyright © 2011-2022 走看看