js 禁止剪切、复制、粘贴的文本框代码

有的网站中不允许用户复制、粘贴、剪切文本框中的内容的,是怎么实现的呢?看看下面的代码就知道了。

<input id=”username” oncut=”return false” oncopy=”return false” oncontextmenu=”return false” onpaste=”return false” name=”username” value=”zzsky” type=”text” />
原文地址:https://www.cnblogs.com/ygcool/p/5395412.html