Categories




PreviousNext
Disable copy, paste in your textarea using javascript     1 Up
 Send mail Views:2362
Belongs to : Javascript
Facebook Bookmarkbookmark this pageStumbleupon Bookmark 

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>

funny pictures and videos
funny pictures and videos
online games
embed code


By - Nirmala, On - 2010-04-08
Send This
PreviousNext

User Comments

1) Here :copy paste is working if i do it from browser menu. edit->copy edit->paste is working
Name: ShafiMail: mohammed.mdshafi01........Added: 2010-05-03


Add NEW Feedback:

Name :     Email :

Website Monitoring Web hosting by Hiox India Contact Us   Privacy Policy   Terms and Conditions