国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

網站網頁常用的防復制代碼

2024-04-25 20:20:02
字體:
來源:轉載
供稿:網友
這篇文章主要為大家詳細介紹了網站網頁常用的防復制代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下,有需要的朋友可以收藏方便以后借鑒。

很多時候,我們不希望自己的網頁內容被別人抄襲或者復制走,那么我們該如何防復制呢?

最牛的防復制代碼1:(將此代碼粘貼到body中可以有效防選中防復制和防鼠標右鍵)

<script type="text/javascript">document.body.oncontextmenu=document.body.ondragstart= document.body.onselectstart=document.body.onbeforecopy=function(){return false;};document.body.onselect=document.body.oncopy=document.body.onmouseup=function(){document.selection.empty();};</script>

最牛的防復制代碼2:(將此代碼粘貼到body中可以有效防選中防復制和防鼠標右鍵)

<script language="JavaScript">document.oncontextmenu=new Function("event.returnValue=false;");document.onselectstart=new Function("event.returnValue=false;");</script>

禁止查看網頁源文件代碼,插入網頁即可。

<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()"><noscript><iframe src="/blog/*>";</iframe></noscript>

1.將徹底屏蔽鼠標右鍵 

oncontextmenu="window.event.returnvalue=false"<table border oncontextmenu=return(false)><td>no</table> //可用于Table

2.取消選取、防止復制

<body onselectstart="return false">

3.不準粘貼

onpaste="return false"

4.防止復制

oncopy="return false;" oncut="return false;"

5.防止被人frame

<SCRIPT LANGUAGE=javascript><!-- if (top.location != self.location)top.location=self.location; // --></SCRIPT>

6.網頁將不能另存為

<noscript><iframe src="/blog/*.html>";</iframe></noscript>

7.改變連接是狀態欄的顯示內容

<a href="http://www.tao2t.com" onMo ... ;window.status='輸入連接狀態欄顯示內容&rsquo;;return true">

8.禁止網頁中目標對象被下載(如圖片) 

下面的代碼將幫助你禁止網頁中目標對象被下載:

<a href="javascript:void(0)" onMouseDown="alert('對不起!圖片不能下載!')"><img src="圖片地址" alt="" /></a>

9.頁面禁止刷新完全,最好在pop出來的窗口里用,沒工具欄的

<body onkeydown="KeyDown()" onbeforeunload="location=location" oncontextmenu="event.returnValue=false"><script language="Javascript"><!-- function KeyDown(){ if ((window.event.altKey)&& ((window.event.keyCode==37)|| (window.event.keyCode==39))){alert("請訪問我的主頁"); event.returnValue=false; } if ((event.keyCode==8)||(event.keyCode==116)){//屏蔽 F5 刷新鍵 event.keyCode=0; event.returnValue=false; } if ((event.ctrlKey)&&(event.keyCode==78)){ //屏蔽 Ctrl+n event.returnValue=false; } if ((event.shiftKey)&&(event.keyCode==121)){ //屏蔽 shift+F10 event.returnValue=false; } } </script> </body>總結了這么多款,總有一款 網站網頁常用的防復制代碼 適合你哦以上就是網站網頁常用的防復制代碼的全部內容,希望對大家的學習和解決疑問有所幫助,也希望大家多多支持武林網。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 县级市| 定结县| 堆龙德庆县| 长寿区| 乌兰浩特市| 天长市| 河北区| 虎林市| 巴里| 红河县| 肥城市| 威海市| 襄城县| 宜丰县| 潼南县| 准格尔旗| 沈丘县| 夏邑县| 黑山县| 东乡族自治县| 通榆县| 鹤庆县| 蛟河市| 抚顺市| 邓州市| 巨野县| 治县。| 剑阁县| 黄龙县| 博湖县| 永仁县| 江都市| 黄石市| 康平县| 昭通市| 黄浦区| 渝北区| 灌阳县| 大厂| 阿尔山市| 鄱阳县|