zoukankan      html  css  js  c++  java
  • 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();
  • 相关阅读:
    auto-sklearn案例解析二
    auto-sklearn案例解析二
    auto-sklearn案例解析一
    auto-sklearn案例解析一
    auto-sklearn简介
    auto-sklearn简介
    auto-sklearn手册
    auto-sklearn手册
    观念
    JDBC总结
  • 原文地址:https://www.cnblogs.com/Steven5007/p/10309379.html
Copyright © 2011-2022 走看看