This script works to stop a right click from doing anything unless the alert() is taken out With it taken out, the right click does something.
1. Why is this ?
2. How do you make it work without the alert() ?
function f(e)
{
if (event.button==2)
{
alert('Please no right click.');
return false;
}
}
document.onmousedown=f
Thanks.
1. Why is this ?
2. How do you make it work without the alert() ?
function f(e)
{
if (event.button==2)
{
alert('Please no right click.');
return false;
}
}
document.onmousedown=f
Thanks.