Disabling the right click on web page using javascript
This code will disable right click on page. This code will disable Copy and paste functionality of the windows. Use this code in Head tag in HTML document. With the help of this code you can prevent your web page content for copy and paste functionality. How to use the code for copy and paste disabling.
How to disable the right click on web page using javascript
The following code will disable the right click on page, this code will disable Copy and paste functionality of the windows. Use this code in Head tag in HTML document, with the help of this code you can prevent your web page content for copy and paste functionality. Now, you are aware how to use the code for copy and paste disabling with the help of javascript.
This code is also helpful to prevent to open View Source of the page.
<Head>
<script language="javascript" type="text/javascript">
var popup = "Sorry, right-click is disabled.";
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>
</Head>
Not working .............