<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button id="btn1">mousedown</button>
  <button id="btn2">mouseup</button>
  <br>
  <br>
  <button id="btn3">mouseover</button>
  <button id="btn4">mouseout</button>
  <br>
  <br>
  <button id="btn5">mousemove</button>
  <br>
  <br>
  <button id="btn6">click</button>
  <button id="btn7">dblclick</button>
  
</body>
</html>
document.querySelector("#btn1").addEventListener("mousedown",function(){
  alert("mousedown event is triggered")
})
document.querySelector("#btn2").addEventListener("mouseup",function(){
  alert("mouseup event is triggered")
})

document.querySelector("#btn3").addEventListener("mouseover",function(){
  alert("mouseover event is triggered")
})
document.querySelector("#btn4").addEventListener("mouseout",function(){
  alert("mouseout event is triggered")
})

document.querySelector("#btn5").addEventListener("mousemove",function(){
  alert("mousemove event is triggered")
})

document.querySelector("#btn6").addEventListener("click",function(){
  alert("click event is triggered")
})
document.querySelector("#btn7").addEventListener("dblclick",function(){
  alert("dblclick event is triggered")
})



External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.