<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
<script language="JavaScript">
//////////F12 disable code////////////////////////
document.onkeypress = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-12');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
document.onmousedown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-keys');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
document.onkeydown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-keys');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
////////////////////Prevent from Right Click Inspect Element /////////////////////////////
$(document).on("contextmenu", function (e) {
e.preventDefault();
alert('Right Click is not allowed');
});
/////////////////////end///////////////////////
</script>
<script language="JavaScript">
//////////F12 disable code////////////////////////
document.onkeypress = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-12');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
document.onmousedown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-keys');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
document.onkeydown = function (event) {
event = (event || window.event);
if (event.keyCode == 123) {
//alert('No F-keys');
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
}
////////////////////Prevent from Right Click Inspect Element /////////////////////////////
$(document).on("contextmenu", function (e) {
e.preventDefault();
alert('Right Click is not allowed');
});
/////////////////////end///////////////////////
</script>
No comments:
Post a Comment