普通用户什么情况下会重复提交呢?
(1)后端接口响应慢或者网速不好
(2)在提交页面提交后,重复刷新
2.jquery ajax 如何避免重复提交
(1)后端接口响应慢或者网速不好
(2)在提交页面提交后,重复刷新
2.jquery ajax 如何避免重复提交
用一个变量加锁:var lock = false;
3.嫌麻烦还有简单的。 写一个loading
.loading {
position: absolute;
z-index: 10000;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: url(...) center center;
}
.shade{
z-index:19891016;
background-color:#000; opacity:0.2;
filter:alpha(opacity=30);
left:0;top:0;
width:100%;height:100%;
position:absolute;
}