Dblclick
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>replit</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<button>click Me</button>
<button>click e</button>
<button>click M</button>
<script src="index.js"></script>
</body>
</html>
let btns = document.querySelectorAll("button")
for (btn of btns){
// btn.addEventListener("click", lo);
// btn.addEventListener("click", ame);
btn.addEventListener("dblclick", function me (){
console.log("double click");
});
}
// function lo(){
// alert("Hello");
// }
// function ame(){
// alert("Navjott");
// }
Comments
Post a Comment