<!doctype html>
<button id="id0" onclick="w('id0','str0')">target0</button>
<button id="id1" onclick="w('id1','str1')">target1</button>
<script>
var flag = true;
var check_msecond = 0;
var check_id = '';
function w(id, str) {
var wdate = new Date();
var msecond = wdate.getTime();
check_msecond = msecond;
if (flag) {
flag = false;
check_id = id;
} else {
flag = true;
if (check_id == id) {
console.log('SAME-ID_' + id);
var past = msecond - check_msecond;
if (past <= 1000) {
wb(id, str);
} }
}
}
function wb(id, str) {
console.log('1000 millsecond later,not more than 3 seconds ' + id + str);
alert('do sth');
}
</script>

double-clicking的更多相关文章

  1. Visual Studio 2019 double clicking project(custom behavior)

    Issue

  2. Essential controls for web app

    AUTO-COMPLETE/AUTO-SUGGEST Auto-complete using Vaadin Offer auto-suggest or auto-complete to help yo ...

  3. 创建实体数据模型【Create Entity Data Model】(EF基础系列5)

    现在我要来为上面一节末尾给出的数据库(SchoolDB)创建实体数据模型: SchoolDB数据库的脚本我已经写好了,如下: USE master GO IF EXISTS(SELECT * FROM ...

  4. Tomcat问题,不能正确访问http://localhost:8080/

    最近在学Struts2框架部分的内容,但是eclipse中配置tomcat遇到了很大的问题,当辛辛苦苦的配置完了之后,竟让连小猫的首页都不能访问,http://localhost:8080/输入了之后 ...

  5. Getting Started with JD Edwards EnterpriseOne Interoperability

      Overview Every enterprise holds a forest of branched system spread across a number of business uni ...

  6. RASPBERRY PI 外设学习资源

    参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi         Get st ...

  7. Total Commander 8.52 Beta 1

    Total Commander 8.52 Beta 1http://www.ghisler.com/852_b1.php 10.08.15 Release Total Commander 8.52 b ...

  8. Yocto开发笔记之《应用程序架构》(QQ交流群:519230208)

    QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 ======================================================== Eclip ...

  9. How can I fix “Compilation unit name must end with .java, or one of the registered Java-like extensions”?

    How can I fix “Compilation unit name must end with .java, or one of the registered Java-like extensi ...

  10. “Stamping” PDF Files Downloaded from SharePoint 2010

    http://blog.falchionconsulting.com/index.php/2012/03/stamping-pdf-files-downloaded-from-sharepoint-2 ...

随机推荐

  1. loj 1154(最大流+枚举汇点)

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26868 思路:拆点,容量为最多能跳的步数,然后设立一个超级源点,源 ...

  2. 手机响应式wap网页最佳方案

    wap页面怎么做? 这个问题困扰了我好久,在PC上我们惯用的px单位在手机上根本不适用,即使我们写了<meta name="viewport" content="w ...

  3. COGS731 [网络流24题] 最长递增子序列(最大流)

    给定正整数序列x1,..., xn (n<=500).(1)计算其最长递增子序列的长度s.(2)计算从给定的序列中最多可取出多少个长度为s的递增子序列.(3)如果允许在取出的序列中多次使用x1和 ...

  4. 错误详情:CL : fatal error C1033: cannot open program database ''

    在网上找了好多方法都不行,最后用下面方法解决了. 修改VS目录下的\VC\bin\cl.exe 的兼容性设置,取消兼容模式和以管理员身份运行即可.

  5. HTML的快速写法:Emmet和Haml

    HTML代码写起来很费事,因为它的标签多. 一种解决方法是采用模板, 在别人写好的骨架内,填入自己的内容.还有一种就是我今天想要介绍的方法—-简写法. 常用的简写法,目前主要是Emmet和Haml两种 ...

  6. 【BZOJ】3319: 黑白树

    http://www.lydsy.com/JudgeOnline/problem.php?id=3319 题意:给一棵n节点的树(n<=1e6),m个操作(m<=1e6),每次操作有两种: ...

  7. POJ 1095 Trees Made to Order(卡特兰数列)

    题目链接 中间计算的各种细节.有的细节没处理好,就wa了...主要思路就是根据卡特兰数列的: h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)h(0) (n&g ...

  8. COJ978 WZJ的数据结构(负二十二)

    试题描述 输入两个正整数N.K,以及N个整数Ai,求第K小数. 输入 第一行为两个正整数N.K.第二行为N个正整数Ai. 输出 输出第K小数. 输入示例 5 41 2 3 3 5 输出示例 3 其他说 ...

  9. Get the image file(s) some informations,Including the Make,Model,Date/Time,etc

    This is a blog about how to get the image file(s) some informations.Including the Make,Model,Date/Ti ...

  10. NHibernate's inverse - what does it really mean?

    NHibernate's concept of 'inverse' in relationships is probably the most often discussed and misunder ...