需要使用异步加载async : true 否则不会出现等待效果

$.ajax({
    url : $('#form').attr("action"),
    data: $('#form').serialize(),
    cache : false,//true使用缓存 。 false不使用缓存
    async : true,//true异步加载。 false同步加载
    type : "POST",
    dataType : 'text',//json/xml/html
    success : function (obj){
        if(obj > 0){
            alert("发送成功");
        }else{
            alert("发送失败");
        }
    },beforeSend: function(){
        showDialog("loading", "正在读取数据...");
    }
});

 

相关文章:

  • 2021-11-26
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案