当前位置: 代码迷 >> Web前端 >> 禁止网页内容复制容易方案代码
  详细解决方案

禁止网页内容复制容易方案代码

热度:99   发布时间:2012-09-10 11:02:32.0
禁止网页内容复制简单方案代码
1.在<body>中加入如下的代码,这样鼠标的左右键都失效了.

topmargin="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()"

2.禁止网页另存为:在<body>后面加入以下代码:
<noscript>
<iframe src="*.htm"></iframe>
</noscript>

3.禁止网页内容复制.粘贴:在<body>中加入以下代码:
<body onmousemove=\HideMenu()\ oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false" onmouseup="document.selection.empty()">
  相关解决方案