|
|
Disable copy, paste in your textarea using javascript - Javascript
|
Views : 2647
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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> |
|
By Nirmala, On - 2010-04-08 |
|
|
|