當(dāng)前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
javascript终极屏蔽右键/禁止复制/禁止另存/禁止右键/禁止选取/禁止粘贴的方法...
生活随笔
收集整理的這篇文章主要介紹了
javascript终极屏蔽右键/禁止复制/禁止另存/禁止右键/禁止选取/禁止粘贴的方法...
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Code
禁止另存代碼:
<noscript>?
<iframe?src="/*>";</iframe>?
</noscript>?
禁止復(fù)制代碼:
<body??
oncontextmenu='return?false'?
ondragstart='return?false'?
onselectstart?='return?false'?
onselect='document.selection.empty()'?
oncopy='document.selection.empty()'?
onbeforecopy='return?false'?
onmouseup='document.selection.empty()'>
禁止右鍵:
<script?language="JavaScript">document.oncontextmenu?=?function()?{?return?false;}</script>
禁止選取:
<body?oncontextmenu="return?false"?ondragstart="return?false"?onselectstart?="return?false"?onselect="document.selection.empty()"?oncopy="document.selection.empty()"?onbeforecopy="return?false"onmouseup="document.selection.empty()>?
禁止粘貼:
<input?type=text?onpaste="return?false">??
禁止另存代碼:
<noscript>?
<iframe?src="/*>";</iframe>?
</noscript>?
禁止復(fù)制代碼:
<body??
oncontextmenu='return?false'?
ondragstart='return?false'?
onselectstart?='return?false'?
onselect='document.selection.empty()'?
oncopy='document.selection.empty()'?
onbeforecopy='return?false'?
onmouseup='document.selection.empty()'>
禁止右鍵:
<script?language="JavaScript">document.oncontextmenu?=?function()?{?return?false;}</script>
禁止選取:
<body?oncontextmenu="return?false"?ondragstart="return?false"?onselectstart?="return?false"?onselect="document.selection.empty()"?oncopy="document.selection.empty()"?onbeforecopy="return?false"onmouseup="document.selection.empty()>?
禁止粘貼:
<input?type=text?onpaste="return?false">??
轉(zhuǎn)載于:https://www.cnblogs.com/hayden/archive/2009/07/31/1535789.html
總結(jié)
以上是生活随笔為你收集整理的javascript终极屏蔽右键/禁止复制/禁止另存/禁止右键/禁止选取/禁止粘贴的方法...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 面试箴言
- 下一篇: 打造0代码全自动GridView-天具神