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

User avatar
Mitch
Posts: 55
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 7 users online :: 0 registered, 0 hidden and 7 guests
Registered users: No registered users
Most users ever online was 19 on Mon May 20, 2019 11:06 pm
Total posts 527
Total topics 406
Total members 73
Our newest member Kelly
No birthdays today