链接被Cliked时禁用多个Ajax请求 [英] Disable multiple Ajax requests when a link is Cliked
本文介绍了链接被Cliked时禁用多个Ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试实施一种避免点击垃圾邮件的方法。我有一个链接按钮,单击该按钮时使用Jquery $ .ajax()命令将请求发送到服务器。我想要一种方法来禁止多次点击,例如在添加评论时在StackOverflow中实现的点击。
I am trying to implement a way to avoid click spamming. I have a Link button that when clicked sends the request to the server using Jquery $.ajax() command. I want a way to prohibit multiple clicks like the one implemented here in StackOverflow when adding a comment.
任何建议?
推荐答案
您可以在完成ajax请求时阻止UI。请查看 blockUI插件,了解此
You can block the UI while the ajax request is done. Give a look to the blockUI plugin for this
这篇关于链接被Cliked时禁用多个Ajax请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文