如何停止用户在其他文本框中复制粘贴值 [英] How to stop user to copy-paste value in other textbox

查看:85
本文介绍了如何停止用户在其他文本框中复制粘贴值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我必须检查2个电子邮件ID是否相同..在第二个文本框上,我已停止用户从第一个文本框复制粘贴ID.请告诉我我必须为该文本框设置什么属性防止其复制粘贴

Hi all

I have to check 2 email id''s are same or not..on the second text-box i have stop user to copy-paste the id from the first textbox.please tell me what property i have to set for the textbox to prevent it from copy-pasting

推荐答案

您需要将TextBox的oncopyonpaste属性设置为false.
You need to set oncopy and onpaste property of your TextBox to false.
<input type="text" name="txtEmail" oncopy="return false"  onpaste="return false" />



祝你好运.



Best of luck.


这篇关于如何停止用户在其他文本框中复制粘贴值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆