How do i disable right click on my web page

Last Updated by Pooja Chikara 11-Mar-20

0 254


To disable save as in HTML page, you have to disable control+s command and also right click on that particular page.

<script language="JavaScript">
$(document).bind("contextmenu",function(e) {
 e.preventDefault();
});
$(document).keydown(function(e){
    if(e.ctrlKey && (e.which === 83)){
       e.preventDefault();
       return false;
    }
});
</script>

Do you think there are other concepts that I may include in this blog? Share with me through the comment box!

I would love to hear from you!

Related Blog = How to disable inspect element


Share:


Leave a Reply


Comments
    Waiting for your comments