Disable copy, paste in your textarea using javascript
by Nirmala[ Edit ] 2010-04-08 17:42:31
Disable copy, paste in your textarea using Javascript
Use the below code to disable copy paste in your textarea.
<html>
<head>
<script type="text/javascript">
function nocopypaste(e)
{
var code = (document.all) ? event.keyCode:e.which;
var msg = "Sorry, this functionality is disabled.";
if (parseInt(code)==17) //CTRL
{
alert(msg);
window.event.returnValue = false;
}
}
</script>
</head>
<body>
<textarea onKeyDown="return nocopypaste(event)"></textarea>
</body>
</html>