如何使用c#禁用文件中的复制粘贴 [英] how to disable copy paste in a file using c#
本文介绍了如何使用c#禁用文件中的复制粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<script type="text/javascript">
$(document).ready(function() {
$('#<%=txtTarget.ClientID%>').bind('cut copy paste',
function(e) { e.preventDefault();
alert("cut , copy , paste disable !!!!!");
});
});
</script>
这是script.how它包含在ac#代码中以及此代码中的哪些更改生成pdf文件无法复制粘贴?
this is script.how it include in a c# code and what change in this code make a pdf file can't copy paste?
推荐答案
(document).ready(function(){
(document).ready(function() {
('#<% = txtTarget.ClientID %> ')。bind('cut copy paste',
函数(e){e.preventDefault();
alert(剪切,复制,粘贴禁用!!!!!);
}) ;
});
< / script >
('#<%=txtTarget.ClientID%>').bind('cut copy paste', function(e) { e.preventDefault(); alert("cut , copy , paste disable !!!!!"); }); }); </script>
这是script.how它包含在ac#代码中以及此代码中的哪些更改生成pdf文件无法复制粘贴?
this is script.how it include in a c# code and what change in this code make a pdf file can't copy paste?
你无法阻止它。就这么简单。
PDF由一个不完全受浏览器控制的组件显示。
您无法在javascript代码中将其关闭。
You can't stop it. It's that simple.
The PDF is being displayed by a component that is not entirely under the control of the browser.
You have no way of turning it off in your javascript code.
这篇关于如何使用c#禁用文件中的复制粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文