HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <div onmousedown="myFunction(event)"> <p> Click any <br> 0 = The left mouse button<br> 1 = The middle mouse button<br> 2 = The right mouse button<br> </p> </div> <script> function myFunction(event){ alert("You pressed button: "+ event.button); } </script> </body> </html>
OUTPUT
×

Save as Private