The difference jquery ajax get psot

1.ajax asynchronous method

ajax({

    type:'post',

    url:'xxx/xxx/xxx.ashx',

    data:{dat:'',txt:'text'},

   async: true, - asynchronous false synchronization

  function(result)

 {

 data= data2;

});

$.ajaxSettings.async=false;

2.$.post(url, data function(result){ alert('');});

3.$.get(url, function(result){alert('');});

$.ajaxSettings.async=true;

Reproduced in: https: //www.cnblogs.com/hzf08/p/11047438.html

Guess you like

Origin blog.csdn.net/weixin_34268843/article/details/92849211