How to disable control+C in your web page to prevent user simply copy your text? Here is the code:-
<html>
<head>
<script language="javascript">
<!--
function Disable_Control_C() {
var keystroke = String.fromCharCode(event.keyCode).toLowerCase();
if (event.ctrlKey && keystroke == 'c') {
event.returnValue = false; // disable Ctrl+C
}
}
//--!>
</script>
</head>
<body onkeydown="javascript:Disable_Control_C()">
Hello World!
</body>
</html>
NOTE: You may need to disable the right click and menu bar to prevent user to copy from your text.
Friday, March 18, 2005
Subscribe to:
Post Comments (Atom)
4 comments:
Hi NG Yew Ban. I've been looking for computer software information and came across your site. I was really after computer software related info but I came across your site and found it a good posting even though this post was'nt exactly what I was after. Thanks for the read
Hello NG Yew Ban. I was looking for some information on discount software and came across your site. Not really what I was after but I found it very interesting. I was looking for discount software related information. Glad I found your site even though it was not exactly what I was after. Keep up the good posting - thanks
Hi NG Yew Ban. I've been looking for software downloads information and came across your site. I was really after software downloads related info but I came across your site and found it a good posting even though this post was'nt exactly what I was after. Thanks for the read
Our site Sri Lanka Hotels was looking for a solution to disable crtl+copy and a way to disable the right click. We found what we were looking for here - Thanks you.
Post a Comment