• ajax 请求问题


    1.ajax 请求锁定页面加载  (加载-异步-关闭-弹框)

       function  agree(id,index){
               var yj=$("#taskTableId tr[data-index='"+index+"']").find("td a[data-name='appComment']").html();
               if( yj=="" || yj=="undefined" || yj==" "){
                   alert("请先填写审批意见!");
                   return;
               }
           layer.load(0, {shade: [0.1,'#D4D4D4'] });
               $.ajax({
                   type:'post',
           //  async:false, //layui.load()在ajax使用时,ajax必须是异步模式,不然layui.load()不起作用。 url:
    'taskAgentsController/processPass.json', data:{"id":id,"yj":yj}, success : function(result) { layer.closeAll('loading'); layer.alert(result.ajaxResultJson.msg); $("#taskTableId").bootstrapTable('refresh'); }, error : function(e){ layer.closeAll('loading'); alert("系统异常!"); } }); }

    2. ajax请求成功,跳转新页面

    window.open(url)
    var new_window = window.open();
    new_window.location ="url"
    new_window.close();
  • 相关阅读:
    子元素margin带动父元素拖动
    SideBar---fixed定位
    身份证号码
    正则表达式
    关于encodeURIComponent的用法
    判断用户使用的浏览设备
    获取cookie值
    第五周学习总结
    第四周学习总结
    寻找你的黑客偶像
  • 原文地址:https://www.cnblogs.com/Steven5007/p/10309379.html
Copyright © 2020-2023  润新知