Net-informations.com

How to Disable Right Click Using jQuery?

When we build a web application, a few times we do not want the users to use the right button of the mouse. It's possible to either completely or partially disable right-click context sensitive menus or replace them with a custom dialog which is applicable to the application. The contextmenu event is sent to an element when the right button of the mouse is clicked on it, but before the context menu is displayed.

Syntax

How to disable right click menu in html page using jquery?

To disable right click menu on the page completely , use the following:

run this source code Try it Yourself

Try right-click on the page

Full Source

How to disable mouse right click on textbox using jQuery?

run this source code Try it Yourself

Try right-click on the textbox

Full Source










net-informations.com (C) 2019    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About