当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 防止网站内容被拷贝的一些方法与优缺点好处与坏处分析

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

Javascript 中的 防止网站内容被拷贝的一些方法与优缺点好处与坏处分析


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 70 ::
收藏到网摘: n/a

他依次作了以下设置:

1、用js禁用了鼠标右键、Ctrl+A等键,实现方式看如下代码:
<body onmouseup="document.selection.empty()" oncontextmenu="return false" onmousemove="document.selection.empty()" oncopy="document.selection.empty()" onselect="document.selection.empty()">

2、用Table截断字符顺序。
看下面的实际方式,这样如果直接Copy内容到记事本,次序会乱的。

微软日前公告了一份需
自己的以及第三方软件,总
要经过调整才能与Windows XP S
数大约有50款。
P2兼容的软件清单,清单包括微软

我见过其他防Copy的方式:

1、打开的窗口是一个没有菜单的窗口,这时候,再禁用鼠标右键,当前窗口页,你无法直接察看源代码。

2、在显示Html数据的时候,有大量的白色字被加了进来,这样,copy的时候,中间被加了大量的垃圾信息。比如如下代码:

给自己带来麻烦了,而且不利于搜索引擎的收录,大量的垃圾白字