JavaScript Prevent Right Click
Add the following javascript code between the tags <head> and </ head> of your web page to disable right click. As an example see here.
Add the following javascript code between the tags <head> and </ head> of your web page to disable right click. As an example see here.
<script language="JavaScript">
<!--
var popup="Stop!!!\n\nRight click is not allowed here.";
function noway(go) {
if (document.all) {
if (event.button == 2) {
alert(popup);
return false;
}
}
if (document.layers) {
if (go.which == 3) {
alert(popup);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;
// --> </script>
0 comments:
Post a Comment