In this article I will explain How to get prompt
message while clicking the F12 key operation in Web site running in the
browser? Using jQuery
As a Developer you can see the code in development time
it’s OK for you, but when others are trying to see your application code and do
some operations definitely we don't want to disclose this. So what is the
solution? We can easily prevent this using some
simple JavaScript and jQuery scripts.
Clients (or) Users will click the F12 Key they got prompt
message like “He / She can’t the code”
Below is JQuery code for F12 Key prompt message code:
<script>
var checkStatus;
var element = new Image();
element.__defineGetter__('id', function ()
{
checkStatus = 'on';
});
setInterval(function () {
checkStatus = 'off';
console.log(element);
console.clear();
document.querySelector('#status').innerHTML
= checkStatus;
}, 1000)
</script>