小编Rei*_*i17的帖子

在博主/网站中禁用复制粘贴的安全方法

我使用博客 https://xiaogushiofficial.blogspot.com/2022/10/deliberately-contamerated-chapter-3.html有这个 Blogspot, 并且我已经输入了 javascript 以禁用右键单击和复制粘贴功能。

    <script language=javascript>
<!--
//Disable right mouse click Script
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;}}}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
Run Code Online (Sandbox Code Playgroud)

还有这个 javascript

js'></script><script type='text/javascript'> if(typeof document.onselectstart!="undefined" )
{document.onselectstart=new Function ("return false" ); } else{document.onmousedown=new Function ("return false" );
document.onmouseup=new Function ("return false"); } </script>
Run Code Online (Sandbox Code Playgroud)

遗憾的是,通过使用该插件并禁用 JavaScript,我编写的这些功能很容易被禁用。

然后我去了另一个网站, https://chrysanthemumgarden.com/novel-tl/ks/ks-3/

该网站可以禁用复制粘贴,并且如果您能够绕过 javascript 并复制和粘贴它,内容将会有所不同。粘贴了一些随机文本。 …

html javascript blogger copy-paste

1
推荐指数
1
解决办法
849
查看次数

标签 统计

blogger ×1

copy-paste ×1

html ×1

javascript ×1