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 ...
随机推荐
- SAE Java开发问题汇总
转自:http://binary.duapp.com/2012/10/275.html 1.sae上传了war后不报错,却出现一片空白: 原因:上传war包不能包含servlet-api和xmlsec ...
- ER-Studio的五种关系说明
1. identifying relationship: 1对多. 父实体的主键是子实体的外键(FK1),且FK1是主键. 2. no identifying, mandatory relations ...
- Hark的数据结构与算法练习之计数排序
算法说明 计数排序属于线性排序,它的时间复杂度远远大于常用的比较排序.(计数是O(n),而比较排序不会超过O(nlog2nJ)). 其实计数排序大部分很好理解的,唯一理解起来很蛋疼的是为了保证算法稳定 ...
- 【LINUX/UNIX网络编程】之使用消息队列,信号量和命名管道实现的多进程服务器(多人群聊系统)
RT,使用消息队列,信号量和命名管道实现的多人群聊系统. 本学期Linux.unix网络编程的第三个作业. 先上实验要求: 实验三 多进程服务器 [实验目的] 1.熟练掌握进程的创建与终止方法: 2 ...
- Flo's Restaurant[HDU1103]
Flo's Restaurant Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- C#线程间同步无法关闭
用C#做了个线程间同步的小程序,但每次关闭窗口后进程仍然在,是什么原因? 解决方法: 要加一句 线程.IsBackground = true; 否则退出的只是窗体 上面的方法没看懂... MSDN上说 ...
- c++ for_each()与仿函数
for_each有一个独门绝技,其他算法没有,那就是可以返回值来获取函数的状态 #include <iostream> #include <vector> #include & ...
- ext4 文件系统的一些记录
https://www.kernel.org/doc/Documentation/filesystems/ext4.txt ext4 权威说明 http://computer-forensics.sa ...
- openstack-L版安装
参照官方install document: http://docs.openstack.org/liberty/install-guide-rdo/ 实验环境:centos7.2 桥接: 192.16 ...
- 启用VTX技术支持启动android的虚拟机 - 报错
第一次启用VTX技术支持启动android的虚拟机,启动时提示如下错误: Starting emulator for AVD 'AVD_for_Android_TV_1080p_by_Google'e ...