我不想允许用户在文本框中剪切复制粘贴 我尝试过以下代码,但它甚至没有绑定(bind)到该元素:
$(document).ready(function(){
$("userName").on("cut copy paste",function(e){
e.preventDefault();
});
});
最佳答案
$(document).ready(function(){
$('#userName').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
关于html - 防止在 html5 应用程序中剪切复制粘贴,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22090615/