码迷,mamicode.com
首页 > 其他好文 > 详细

w_click_twice

时间:2016-11-11 19:26:47      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:his   ons   div   cond   cli   false   click   date   color   

var w_global_obj;
var dat = new Date();
var w_golbal_count_millseconds;
function w_click_twice(w_current_obj, w_period) {
    console.log(w_golbal_count_millseconds);
    var current = dat.getTime();
    var w_this_period = current - w_golbal_count_millseconds;
    w_golbal_count_millseconds = current;
    if (w_global_obj != w_current_obj) {
        w_global_obj = w_current_obj;
        return true;
    } else if (w_this_period > w_period) {
        return true;
    } else {
        return false;
    }
}
<script src="w_fun_click.js"></script>

 

w_click_twice

标签:his   ons   div   cond   cli   false   click   date   color   

原文地址:http://www.cnblogs.com/yuanjiangw/p/6055082.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!