Thursday, 1 October 2015

How to Disable F12 key Using JavaScript

How to Disable F12 key Using JavaScript

How to Disable F12 key Using JavaScript: In this Article you can get the JavaScript code of Disable the Function key F12. so no one can use inspect element and he/she can see your website source code your website sources using Function key. Many of the Copy Cats are copying your content still you use Disable copy/ paste JavaScript or CSS code on your blog. They copy your content line by line using F12 function key so that's why this JavaScript code is play very important role to save your contents from Copy/Cats.
You can see The Disable CSS selection Code Also you can See the Disable JavaScript Copy Paste Code.
Here is the  Disable F12 key Using JavaScript Code.
<script language="JavaScript">
//////////F12 disable code twotricks.com////////////////////////
    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;
        }
    }
/////////////////////end///////////////////////
</script>
 You just need to paste this code on your above your website </head> tag.

2 comments:

  1. Can we remove inspect element from our page....!

    ReplyDelete
    Replies
    1. You can disable F12 Function Key using this JavaScript

      Delete