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'
                );
  • 相关阅读:
    MOXA串口服务器使用
    【笔记】Winform设置快捷键
    comboBox联动
    【笔记】winform窗体显示
    关于xml文件的使用
    day_6
    day_5
    dau_4
    day_3
    day_2
  • 原文地址:https://www.cnblogs.com/kongxc/p/6817324.html
Copyright © 2011-2022 走看看