Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add a right click listener javascript

element.addEventListener('contextmenu', (e) => {
	e.preventDefault();
    alert('Success');
}, false);
 
PREVIOUS NEXT
Tagged: #add #click #listener #javascript
ADD COMMENT
Topic
Name
8+3 =