这是代码。Hi,I have a text box and should allow user to type the text but not to allow them to copy/paste or right click.Here is the code. 展开 | 选择 | Wrap | 行号推荐答案首先要问自己的问题是为什么你需要这个。 很少这是个好主意。事实上,有些浏览器允许用户阻止JavaScript代码本身阻止某些预期的浏览器功能。The first question to ask yourself is why you need this.Rarely is it a good idea. In fact, some browsers allow users to prevent JavaScript code itself from preventing certain expected browser functionality. 问自己的第一个问题是为什么你需要这个。 很少这是个好主意。实际上,某些浏览器允许用户阻止JavaScript代码本身阻止某些预期的浏览器功能。The first question to ask yourself is why you need this.Rarely is it a good idea. In fact, some browsers allow users to prevent JavaScript code itself from preventing certain expected browser functionality. 我需要这个,因为我们正在使用电子邮件选项,所以我希望用户输入电子邮件ID。他们不应该复制/粘贴id',他们应该只键入它。因此我应该解决这个问题!! 任何想法??? 问候 ArchanaHi,I need this because we are using email option so i want user to type there email id .They should not copy/paste there id''s they should only type it. For that reason i should solve this problem!!Any idea???with regardsArchana人类打字大大增加了错误的机会。 表单需要更长时间才能填写。 这些类型的限制可以使残障用户无法访问该页面。 这样做也会激怒普通用户。 它也没有惩罚那些有javascript禁用的人,有多公平是吗? 脚本中的内容会阻止< shift> +< insert>还是粘贴菜单键? i求你先问问自己为什么要走这条路。 点击''提交''可以创建具有法律约束力的合同。 没有足够的理由这样做。human typing vastly increases the chance for error.the form take longer to fill out.these types of restrictions can make the page less accessible to disabled users.doing so will also anger a large chuck of regular users.it also does nothing to penalize someone who has javascript disabled, how fair is that?what in your script prevents <shift>+<insert> or a menu key from pasting it in?i beg you to ask yourself why you are going down this path in the first place.clicking ''submit'' can create a legally binding contract.there is not a good enough reason to do so. 这篇关于防止用户复制/粘贴选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-22 22:14
查看更多