jQuery dblclick () method
Examples
Double-click the <p> element when the alarm text:
$("p").dblclick(function(){
alert("这个段落被双击。");
});
alert("这个段落被双击。");
});
try it"
Definition and Usage
When you click the element occurs dblclick event.
dblclick () method dblclick trigger event, or when a predetermined function to run when the event occurs dblclick.
Tip: dblclick event will generate click events. If these two events are applied to the same element, it will cause problems.
grammar
Trigger the selected element dblclick events:
$(selector).dblclick()
尝试一下
Adding Functions to dblclick event:
$(selector).dblclick(function)
尝试一下
参数 | 描述 |
---|---|
function | 可选。规定当 dblclick 事件发生时运行的函数。 |