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;
 

disable right click

How can i stop people from right clicking on my web page

Use this code in the head section of your page

try right clicking now to see the effect

for the cut & paste code click here

*please note this only stops people from right clicking on your page and there is no real way to stop people from veiwing your html, if someone is determined to see your code they will.


« back to html tutorial

//if the user is using IE 4+ if (document.all) document.write('click here to bookmark this site!') else document.write('press Ctrl and D to bookmark this page')
home

html tutorial

make money
from your website