Question : how to prevent user to inspect my website
Answered by : rasel-hossain
document.addEventListener('contextmenu', function(e) { e.preventDefault();
});
document.onkeydown = function (e) { if (e.keyCode === 123) { return false; } if (e.ctrlKey && e.shiftKey && e.keyCode == "I".charCodeAt(0)) { return false; } if (e.ctrlKey && e.shiftKey && e.keyCode == "C".charCodeAt(0)) { return false; } if (e.ctrlKey && e.shiftKey && e.keyCode == "J".charCodeAt(0)) { return false; } if (e.ctrlKey && e.keyCode == "U".charCodeAt(0)) { return false; }
};
Source : https://stackoverflow.com/questions/28690564/is-it-possible-to-remove-inspect-element | Last Update : Thu, 04 Aug 22
Question : how to prevent user from inspect element
Answered by :
document.addEventListener('contextmenu', function(e) { e.preventDefault();
});
Source : https://stackoverflow.com/questions/28690564/is-it-possible-to-remove-inspect-element | Last Update : Mon, 17 May 21