HTML DOM Events

The oncontextmenu Event

Use the addEventListener() method to attach a "contextmenu" event to a div element.

Right-click in this box to see the hidden content!