duanzhange

解决ajax重复提交问题?

//全局变量
var a_flag=true;
$("#1001a").on(\'click\',function () {
//先判断是否正在执行
if(!a_flag){
return false;
}
//设置为执行状态
a_flag=false;
$.ajax({
type:"get",
url:"udpclient.php?op=1001a",
dataType:"json",
success:function (data){
alert("000");
console.log(data);
console.log(999);
//执行完成
a_flag=true;
// console.log(JSON.parse(data));
 
}
 
});
});

分类:

技术点:

相关文章:

  • 2022-01-23
  • 2021-11-12
  • 2021-11-12
  • 2021-11-12
  • 2021-07-01
  • 2021-11-02
  • 2021-11-12
  • 2021-11-12
猜你喜欢
  • 2021-11-12
  • 2021-11-12
  • 2021-12-25
  • 2021-12-18
  • 2021-10-14
  • 2021-11-12
  • 2021-11-29
相关资源
相似解决方案