document.addEventListener('contextmenu', event => event.preventDefault());

disable right click

//Disable mouse right click $("body").on("contextmenu", function(e) { return false; });

disable right click javascript

// for disabling right click use this as it is document.addEventListener('contextmenu', event => event.preventDefault()); event.preventDefault()

how to disable right click in javascript

<div> This is the Phone and NO ONE SHOULD RIGHT CLICK THIS! >:) </br> <img class="tlClogo" src="" style="height: 120px; width:120px;"> </div></br></br></br></br> And this is the Keyboard, ofcourse yo can right click this :)</br> <img src="" style="height: 120px; width:120px;"> $('img').bind('contextmenu', function(e){ alert("This Logo is protected");return false; });

disable right click div