HTML | oncontextmenu Event Attribute
This attribute works when the user right-clicks on an element to open the context menu.
- It supports all HTML elements.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Attribute Value: This attribute contains single value script. The script to be run when oncontextmenu attribute called. It is supported by all HTML elements.
Note: This attribute is new in HTML 5.
Supported Browsers: The browser supported by oncontextmenu attribute are listed below:
- Internet Explorer