All the questions I saw about how to detect middle mouse clicks in JavaScript are related to jQuery, but I am wondering how I can detect middle mouse clicks using normal JavaScript. I tried using onClick() , but it only works for the left mouse button.
Is there a JavaScript function that can detect left and middle mouse clicks or, if not, can detect middle mouse clicks?
The reason I'm asking is because I want to make a function call when clicking links, regardless of whether the left or middle mouse button was used.
javascript
Nate
source share