[Edit]
+
0
-
0
js capture right-click event
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15<!doctype html> <html> <body> <button id="my-button">Right-click me</button> <script> var myButton = document.querySelector('#my-button'); myButton.oncontextmenu = function() { console.log('contextmenu event occurred.'); }; </script> </body> </html> <!-- Warning: oncontextmenu event is handled when context menu key on keyboard is pressed. -->