JS Coding Questions Logo
JS Coding Questions
#382💼 Interview💻 Code

How do you disable right click in the web page

Advertisement

728x90

The right click on the page can be disabled by returning false from the oncontextmenu attribute on the body element.

html
1<body oncontextmenu="return false;"></body>

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 40

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
382of476