zoukankan      html  css  js  c++  java
  • ajax的上拉功能

    <div class="footReturn">
    <!-- <a id="showcard" onClick="showcard()" class="submit" href="javascript:void(0)">保 存</a> -->
    <div class="window" id="windowcenter">
    <!-- <div id="title" class="wtitle">保存<span class="close" id="alertclose"></span></div> -->
    <div class="content">
    <div id="txt"></div>
    </div>
    </div>
    </div>
    </div>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript">
    function showcard(){

    var submitData= {
    imo: $("#imo").val(),
    type: $("#type").val(),
    taocan: $("#taocan").val(),
    userId: $("#userId").val(),
    };

    $.ajax({
    type:"POST",
    url:"{:U('Card/cord')}",
    //url:"__ROOT__/testpay/jsapicall.php",
    data:submitData,
    dataType:"json",
    success:function(data){
    //alert(data);
    if (data.errno == 200) {
    alert(data.error);
    location.href="/weishop/index.php?m=Card&a=index";
    } else {
    alert(data.error);
    }

    }
    })
    //location.href="__ROOT__/testpay/jsapicall.php";
    }

    $("#windowclosebutton").click(function () {
    $("#windowcenter").slideUp(500);

    });
    $("#alertclose").click(function () {
    $("#windowcenter").slideUp(500);

    });

    //////////////////////////////////////////////////////////////////

    if($return){
    $re['errno'] = '200';
    $re['error'] = '充值成功';
    }else{
    $re['errno'] = '0';
    $re['error'] = '充值失败';
    $re['url'] = "";
    }

    echo json_encode($re); 

  • 相关阅读:
    CF1439E
    CF1446
    CSP2020 游记
    CF1442
    CF1444E
    CF1444
    CF850F Rainbow Balls
    A
    uoj266[清华集训2016]Alice和Bob又在玩游戏(SG函数)
    loj536「LibreOJ Round #6」花札(二分图博弈)
  • 原文地址:https://www.cnblogs.com/taoxiansheng/p/3853493.html
Copyright © 2011-2022 走看看