
Qusetion - How to disable right click button of mouse in webpage.
Solution-
add below script in head section of web page
<script type="text/javascript">
var msg = "This function is disabled!";
var bV = parseInt(navigator.appVersion)
var bNS = navigator.appName == "Netscape"
var bIE = navigator.appName == "Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1) {
alert(msg)
return false
} else if (bIE && (event.button > 1)) {
alert(msg)
return false;
}
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV < 5) window.onmousedown = nrc;
</script>
..........................................................................................Read Also...