禁止另存代码:
<noscript>
<iframe src="/*>";</iframe>
</noscript>
禁止复制代码:
<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">
个人签名
-------------------------------------
网页元素禁用技巧
本文介绍了如何通过HTML和JavaScript禁用网页上的多种操作,包括禁止另存为、禁止复制、禁用右键菜单、阻止文本选取及防止粘贴等功能。这些技术常用于保护网站内容不被轻易下载或复制。
396

被折叠的 条评论
为什么被折叠?



