Click the order in which the events are executed:
click: Mousedown,mouseout,click;
Double-click (DblClick): Mousedown,mouseout,click, Mousedown,mouseout,click,dblclick;
in a double-click event (DblClick), the two-click event that is triggered (clicking), the first click event is masked out, but not the second time. That is, a double-click event (DblClick) Returns the result of a single clicking event and a double click event (DblClick). Instead of a double-click event (DblClick) result and two click event Results (clicks).
In this case, the problem is solved by simply eliminating the extra click event.
Specific code:
var timefunction = null;
function Click () {
Cancels the method that was not executed last time delay
Cleartimeout (timefunction);
Execution delay
timefunction = setTimeout (function () {
Do function writes the code here to execute the Click event
Alert ("click");
},1000);
});
function Dbclick () {
Cancels the method that was not executed last time delay
Cleartimeout (timefunction);
Double-click the execution code of the event
Alert ("Double-click");
})
JSP page click the double tap event to differentiate