zoukankan      html  css  js  c++  java
  • jquery-Ajax请求用例码

            $.ajax({
                        type:"post",
                        url: 'domain’,
                        success:function(data){
                       console.log(data);
                        } ,
                        dataType: "json",
                        async:false
                    });

    警告:Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

    问题是永远不建议用 async:false ---->设置为:

          $.ajax({
                        type:"post",
                        url: 'domain’,
                        success:function(data){
                       console.log(data);
                        } ,
                        dataType: "json",
                        async:true
                    });

    修改异步后,解决;

  • 相关阅读:
    7
    6
    5.1
    5
    C#类库帮助类
    Asp.net 数据库依赖那些事
    C#使用NLog记录日志
    JQuery常用操作实现方式
    常用Sql 标量值函数
    Sql语句查询XML
  • 原文地址:https://www.cnblogs.com/q1104460935/p/6911719.html
Copyright © 2011-2022 走看看