How to disable F12 for your website to protect your content?

User avatar
Mitch
Posts: 61
Joined: Mon Jan 30, 2017 4:58 am

How to disable F12 for your website to protect your content?

Tue Oct 02, 2018 9:33 am

If you would like to protect your content just place the codes below into an HTML module like you would any other type of code and there you go. Below:

Code: Select all

<script language="JavaScript">
	
/* Copyright Protection F12 */
document.onkeypress = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
           //alert('No F-12');
            return false;
        }
    }
document.onmousedown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
document.onkeydown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
</script>
<!--End Copyright Protection F12 -->
I hope this will help you guys.


Return to “WEB DESIGN, PHP, HTML”

Links

In total there are 4 users online :: 3 registered, 0 hidden and 1 guest
Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]
Most users ever online was 162 on Fri Dec 06, 2019 8:39 pm
Total posts 537
Total topics 415
Total members 73
Our newest member Kelly
No birthdays today