如何删除网页中禁止复制的代码
发布网友
发布时间:2022-04-27 03:00
我来回答
共2个回答
热心网友
时间:2022-04-25 12:30
<BODY oncontextmenu="return false" onselectstart="return false"
ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty()>
-----------------------------------------------
防止复制的js
-----------------------------------------------
<SCRIPT language=JavaScript1.2>
function disableselect(e){
return false}
function reEnable(){return true
}
file://if IE4+
document.onselectstart=new Function ("return false")
file://if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</SCRIPT>
<SCRIPT language=JavaScript type=text/JavaScript>
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</SCRIPT>
-------------------------------------------------------
防止下载的js
-------------------------------------------------------
<noscript><iframe src=""></iframe></noscript>
--------------------------------------------------------
下面是防止右键的js:
--------------------------------------------------------
<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu() {
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e) {
if (window.Event){
if (e.which == 2 || e.which == 3)
return false;
}else{
if (event.button == 2 || event.button == 3){
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//-->
</script>
找到相应的删除即可,不会的话,可以把html 发出来我帮你删
========================================================================
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>禁止网页复制的代码</title>
</head>
<body style="text-align:center">
<p> </p>
<p> </p>
<p>网页禁止右键、禁止查看源代码、禁止复制的代码,试试你的右键、ctrl+c和ctrl+c吧~
<SCRIPT language=javascript type=text/javascript>
<!--
document.oncontextmenu=new Function('event.returnValue=false;');
document.onselectstart=new Function('event.returnValue=false;');
-->
</SCRIPT>
</p>
<p>来源:<a href="#" target="_blank">懒人图库</a> 感谢:<a href="#" target="_blank">你疯啦</a>
</body>
</html>
热心网友
时间:2022-04-25 13:48
检查源代码,把控制台内容全删了