js double click event dblclick/ondblclick

The pit that js double-click event crawled through

<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").dblclick(function(){
    $("p").slideToggle();
  });
});
</script>
</head>
<body>
<p>这是一个段落。</p>
<button>请双击此处</button>
</body>
</html>

There is nothing wrong with this code, but it does not execute when you switch to the mobile phone mode in the browser. Actually, there is no problem. It is no problem to switch back to the normal mode or run it directly on the mobile phone.

Guess you like

Origin blog.csdn.net/weixin_42409975/article/details/108369316