double-clicking
<!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的更多相关文章
- Visual Studio 2019 double clicking project(custom behavior)
Issue
- Essential controls for web app
AUTO-COMPLETE/AUTO-SUGGEST Auto-complete using Vaadin Offer auto-suggest or auto-complete to help yo ...
- 创建实体数据模型【Create Entity Data Model】(EF基础系列5)
现在我要来为上面一节末尾给出的数据库(SchoolDB)创建实体数据模型: SchoolDB数据库的脚本我已经写好了,如下: USE master GO IF EXISTS(SELECT * FROM ...
- Tomcat问题,不能正确访问http://localhost:8080/
最近在学Struts2框架部分的内容,但是eclipse中配置tomcat遇到了很大的问题,当辛辛苦苦的配置完了之后,竟让连小猫的首页都不能访问,http://localhost:8080/输入了之后 ...
- Getting Started with JD Edwards EnterpriseOne Interoperability
Overview Every enterprise holds a forest of branched system spread across a number of business uni ...
- RASPBERRY PI 外设学习资源
参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi Get st ...
- 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 ...
- Yocto开发笔记之《应用程序架构》(QQ交流群:519230208)
QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 ======================================================== Eclip ...
- 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 ...
- “Stamping” PDF Files Downloaded from SharePoint 2010
http://blog.falchionconsulting.com/index.php/2012/03/stamping-pdf-files-downloaded-from-sharepoint-2 ...
随机推荐
- hdu 3746 kmp求循环节
题意就是将所给的字符串变成多个完整的循环(至少两个),然后给出最少需要添加的字符数.
- 三星笔记本预装WIN8_降级WIN7方法
相信很多人在近两年购买笔记本都会遇到这样的问题.预装系统是windows 8用着不习惯想换系统的请往下看.换windows 7 windows XP 设备方法相同 WIN8降级WIN7是要重新分区的 ...
- 织梦内页读取栏目banner图
<img src="{dede:field name='typeid' runphp='yes'} global $dsql; $typeid = @me; $query = 'SEL ...
- hdu2159
#include<bits/stdc++.h> #define MAX 155 using namespace std; struct Node { int exp; int pat; } ...
- SU suwind命令学习
- Xamarin Android项目运行失败
Xamarin Android项目运行失败 错误信息:Build Failed: MonoDroid does not support running the previous version. P ...
- 【python游戏编程之旅】第五篇---嗷大喵爱吃鱼小游戏开发实例
本系列博客介绍以python+pygame库进行小游戏的开发.有写的不对之处还望各位海涵. 我们一同在前几期的博客中已经学到了很多pygame的基本知识了,现在该做个小游戏实战一下了. 前几期博客链接 ...
- 【BZOJ】2178: 圆的面积并
http://www.lydsy.com/JudgeOnline/problem.php?id=2178 题意:给出n<=1000个圆,求这些圆的面积并 #include <cstdio& ...
- 【BZOJ】1040: [ZJOI2008]骑士(环套树dp)
http://www.lydsy.com/JudgeOnline/problem.php?id=1040 简直不能再神的题orz. 蒟蒻即使蒟蒻,完全不会. 一开始看到数据n<=1000000就 ...
- 【wikioi】1033 蚯蚓的游戏问题(费用流)
http://wikioi.com/problem/1033/ 这题也是很水的费用流啊,同之前那题一样,拆点然后建边,容量为1,费用为点权.然后建个源连第一行每个点,容量为1,费用为0,然后最后一行每 ...