Home  >  Article  >  Backend Development  >  关于同步异步请求服务器的一个问题

关于同步异步请求服务器的一个问题

WBOY
WBOYOriginal
2016-06-23 14:20:11733browse


大家在用JS请求PHP服务器做一些事情的时候,一般都会用到json吧
如果做成按钮让用户来请求,那就会出现用户不小心双击了按钮的情况
这种防止重复提交的方法我看过很多,但今天自己测试的时候发现,我把请求默认的异步方式改成同步的,好像就能解决了,不知道是不是真的如此。大家有什么见解?


回复讨论(解决方案)

同步?那你就慢慢等吧

同步的话还用ajax做什么。。。
如果仅仅为了防双击可以点击后设置按钮不可用。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn