Categories




PreviousNext
Disable copy, paste in your textarea using javascript     1 Up
 Send mail Views:718
Belongs to : Javascript
Facebook Bookmarkbookmark this page Digg Bookmark Delicious BookmarkStumbleupon Bookmarkshare with orkut Post to Google Buzz

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>

Pictures and Videos
Online Calculators
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 :

 Server Monitoring Web hosting by Hiox India Privacy Policy Terms and Conditions