zoukankan      html  css  js  c++  java
  • ajax 函数回调

    var initTaxPriod = function (taxNo) {
    intitSearch();
    $("#taxPeriod").html("");
    taxPeriod.getTaxPeriodWithCallback($("#purchaserTaxNo").val(), getTaxPeriod);
    };
    =======================================
    var getTaxPeriod = function (currPeriod) {
    $("#taxPeriod").html(currPeriod.taxPeriod);
    };
    =======================================
    var getTaxPeriodWithCallback = function (taxNo, callback) {
    $.ajax({
    url: CTX + "/taxPeriod/getTaxPeriod",
    type: "GET",
    dataType: "json",
    data: {'taxNo': taxNo},
    cache: false,
    success: function (result) {
    if (!result.success || !result.data) {
    // logger.error("get code error, message=" + result.message);
    layer.msg("税款所属期获取失败,请手动刷新", {
    icon: 2,
    time: 1500, //2秒关闭(如果不配置,默认是3秒)
    skin: 'new_icon',
    offset: 't',
    area: ['auto', '30px'],
    anim: 3
    });
    $(".showTaxPeriod").hide();
    $('.refresh_tax').show();
    } else if (result.success) {
    var taxPeriod = result.data;
    // fn.call(this);
    if (taxPeriod) {
    $(".showTaxPeriod").show();
    } else {
    $(".showTaxPeriod").hide();
    }
    callback(taxPeriod);
    $(".refresh_tax").hide();
    }
    }
    });
    };
  • 相关阅读:
    windows下postgreSQL安装与启动
    Map、Set、List区别
    责任链模式实战
    Java的URL类(二)
    linux 之分区和文件系统
    linux 之网络命令
    linux 之用户管理
    linux 权限之acl
    我的hadoop学习之路
    Hadoop 学习之Docker
  • 原文地址:https://www.cnblogs.com/dand/p/10530728.html
Copyright © 2011-2022 走看看