简称 js防连点 var flag = true; $(".yzm>span").click(function(){ if(!flag){ return false } flag = false; var time = 60; var timer = setInterval(function(){ time--; if(time<=0){ $(".yzm>span").html("…
为了防止用户或者测试MM疯狂的点击某个button,写个方法防止按钮连续点击. public class Utils { private static long lastClickTime; public synchronized static boolean isFastClick() { long time = System.currentTimeMillis(); if ( time - lastClickTime < 500) { return true; } lastClickTime…