Disallowing cut copy paste operations on a textbox
来源:互联网 发布:linux get请求url 编辑:程序博客网 时间:2024/05/19 05:02
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%=txtNew.ClientID %>').bind("cut copy paste", function (e) {//use bind to attach the required event handler for cut, copy, and paste events for textbox
e.preventDefault(); //Override the default cut/copy/paste behavior
alert("cut copy paste disable in this textbox");
})
$('#<%=txtConfirm.ClientID %>').bind("cut copy paste", function (e) {
e.preventDefault();
alert("cut copy paste disable in this textbox");
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
<asp:Label ID="lblCurrent" runat="server" Text="Current Password:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtCurrent" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblNew" runat="server" Text="New Password:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtNew" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblConfirm" runat="server" Text="Confirm New Password:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtConfirm" runat="server"></asp:TextBox>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
- Disallowing cut copy paste operations on a textbox
- Disable Copy&Cut&paste
- Disabling Copy/Paste in a Textbox control in C#
- iPhone中如何copy,cut,paste
- play vim of cut ,copy paste
- WPF禁用文本框的copy,paste,cut功能
- vim cut &paste
- 给EditCtrl添加自定义菜单并实现Copy,Cut和Paste功能
- VMware - support Cut, Copy, or Paste to and from VM's
- password密码输入框禁止copy cut paste,jQuery快速搞定
- SUSE VNC copy&paste
- vim copy&&paste
- Android Copy and Paste
- UITextView copy and paste
- If a class has a pointer member, it needs copy operations (copy constructor and copy assignment); sec10.4.4.1.
- Design a stack with operations on middle element
- Excel And DataGridView Copy/Paste
- Android 拷贝/粘贴(Copy/Paste)
- astdb内存数据库 内核详解
- 从mars老师的视频,到社区里面寻找前辈的教程。分享,一直都是进步的奉献者
- 揭示Win32 API拦截细节
- android中Activity的方法回调思想
- Archivelog restore complete. Elapsed time: 0:00:19
- Disallowing cut copy paste operations on a textbox
- WMI中Win32 Classes的URL
- 展讯:增加另一种主菜单风格(变形金刚)
- Android SAX操作xml
- linux 信号量使用
- 给宝宝剃满月头是不科学的
- 一些代理和FactoryBean有关知识的补充
- IPB 帧的编码熟悉 解码顺序 与显示顺序
- Pan JiaPu/ A real-time QRS detection algorithm