Home > Code > Javascript > Disable copy and paste in the textbox using javascript

Disable copy and paste in the textbox using javascript

by Narain Siddharth   on Feb 16, 2011   Category: Javascript   |  Views: 2482    |  Points: 25   |  Silver 


Using javascript code we can disable the copy and paste operations in the specific textbox. See the below sample code
<asp:TextBox runat=”server” ID=”TxtPassword?  oncopy=”return false” onpaste=”return false”></asp:TextBox>




Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts