How to disable right click on a website or blog

 What is disable right click? Disable right-click is a way to prevent a blog or website page from being right-clicked. where when the button on the mouse is on the right or what is called the right click, a message will appear. where the message can be changed according to your wishes

How to disable right click on a website or blog


Is this feature dependent? it's up to you :) you must have your own reasons why this feature should be activated or not. but if you want to apply it you can follow the steps below.

How to Disable Right Click on a blog or website page

Go to your blog or website

Install the following code

For blogs, you can install it by adding a gadget and selecting HTML/JavaScript

<script>

var message="Sorry, Right Click Currently I Disable";

///////////////////////////////////

function clickIE4(){if (event.button==2){alert(message);return false;}}

function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}

if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}

else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}

document.oncontextmenu=new Function("alert(message);return false")

</script>



replace the text in red with the message you want

Previous Post Next Post