更改光标并防止单击AJAX请求
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了更改光标并防止单击AJAX请求相关的知识,希望对你有一定的参考价值。
I found this really useful when using AJAX that will change database. Preventing the user to re-do the action is not the best way but it still is a little unobtrusive to the user as it lets him navigate the page and know what is going on.
$(this).addClass('wait').bind('click',function(){ return false; }); }).ajaxStop(function(){ $(this).removeClass('wait').unbind('click'); }); //On the CSS html.wait, html.wait * {cursor:wait;}
以上是关于更改光标并防止单击AJAX请求的主要内容,如果未能解决你的问题,请参考以下文章
当 PrimeFaces ajax 请求正在进行时,将鼠标光标更改为忙碌模式
Thymeleaf - 如何交互和重新加载 Javascript?