📜  在单击之前听双击 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:04.241000             🧑  作者: Mango

代码示例1
element.onclick = event => {
   if (event.detail === 1) {
     // it was a single click
   } else if (event.detail === 2) {
     // it was a double click
   }
};