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

User avatar
Mitch
Posts: 54
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 3 users online :: 1 registered, 0 hidden and 2 guests
Registered users: Bing [Bot]
Most users ever online was 16 on Sat May 18, 2019 8:23 am
Total posts 501
Total topics 380
Total members 72
Our newest member Agatha
No birthdays today