gpt4 book ai didi

jquery - 我如何使用 jQuery 处理双击事件?

转载 作者:行者123 更新时间:2023-12-01 02:08:52 24 4
gpt4 key购买 nike

有没有办法使用 jQuery 将事件处理程序绑定(bind)到双击而不是单击?

最佳答案

当然,jQuery 有一个 dblclick()事件:

$("div").dblclick(function() {
alert("double clicked");
});

来自文档的一个警告:

It is inadvisable to bind handlers to both the click and dblclick events for the same element

关于jquery - 我如何使用 jQuery 处理双击事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2286258/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com