Catch Right Mouse And Characters

[Total: 0    Average: 0/5]

This will catch the right button or specific charcters.

Body Code:

<big>Type right button Shift, Alt or CTRL</big><br>
<SCRIPT language=JavaScript>
<!--
var message="Copy is forbidden"; //protect from right-click
function click(mouse) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (mouse.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MouseDown); //protect from keyboard keypress
function keypressed() {
alert(" You cant copy");
}
}
document.onmousedown=click;
document.onkeydown=keypressed;
// -->
</SCRIPT>

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *