zoukankan      html  css  js  c++  java
  • Jquery的同步和异步请求

       1 异步请求:
        1.1 $.ajax
           $.ajax({
                    url : 'your url',
                    data:{name:value},
                    cache : false,
                    async : true,
                    type : "POST",
                    dataType : 'json/xml/html',
                    success : function (result){
                        do something....
                    }
                });
        2 同步请求
        2.1 $.ajax
           $.ajax({
                    url : 'your url',
                    data:{name:value},
                    cache : false,
                    async : false,
                    type : "POST",
                    dataType : 'json/xml/html',
                    success : function (result){
                        do something....
                    }
                });
        2.2 $.post
          $.post(
                    'your url',
                    {name:value},
                    function(data) {
                        do something...
                    },
                'json/xml/html'
                );

  • 相关阅读:
    c# IOSerialize 验证码、图片缩放
    SqlServer 分库分表
    权限系统数据库设计
    SqlServer 读写分离
    树转二叉树
    数据结构:图的存储结构之邻接矩阵、邻接表
    【数据结构】数据结构-图的基本概念
    哈夫曼树
    二叉树遍历方法
    Oracle 检查约束check
  • 原文地址:https://www.cnblogs.com/xuyatao/p/7417135.html
Copyright © 2011-2022 走看看