I am making a website & want to make it secure from the consumer from fetching the content. So i just wanted to disable the the right click option on my website. Please Help Me with the HTML Code...!
I am making a website & want to make it secure from the consumer from fetching the content. So i just wanted to disable the the right click option on my website. Please Help Me with the HTML Code...!
Here is the code for HTML just copy & paste it on the page where you want to stop right click option on it.
<SCRIPT language=JavaScript>
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>
Here is the java script. You have to paste it in the <head>...</head> tags of your html code.
<SCRIPT>function click() {if (event.button==2) {alert('Ooops..!\nRight click is disabled!');}}document.onmousedown=click// - -></SCRIPT>
Copy and paste the code between the <head> </head> tags of your webpage.
<script language=JavaScript>
var message="Copy Rights -- Cannot Copy anything from HERE";
function click(z) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (z.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>
Bookmarks