点击事件和双击事件

//点击次数
var times=0;
function clickEvent(param) {
    times++;
    setTimeout(function() {
        if(1==times){
            //console.log("单击");
            clickEvent1(param);
        }else if(2==times){
            //console.log("双击");
            clickEvent2(param);
        }
        time=0;
    }, 300);
}

猜你喜欢

转载自www.cnblogs.com/mjtabu/p/11493722.html