禁止通过鼠标拖动来选择文章内容,很有效的一个禁止复制方法。
<html> <head> <meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" /> <meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" /> <title>文本无法选择效果,sky整理收集,站长特效欢迎您。</title> <script type="text/javascript"> function disableSelection(target){ if (typeof target.onselectstart!="undefined") //IE route target.onselectstart=function(){return false} else if (typeof target.style.MozUserSelect!="undefined") //Firefox route target.style.MozUserSelect="none" else //All other route (ie: Opera) target.onmousedown=function(){return false} target.style.cursor = "default" }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 //Sample usages //disableSelection(document.body) //Disable text selection on entire body //disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv" </script> </head> <body> <a href="http://www.zzjs.net/">站长特效网</a>,站长必备的高质量网页特效和广告代码。zzjs.net,站长js特效。<hr> <!--欢迎来到站长特效网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.zzjs.net,zzjs@msn.com,用.net打造靓站--> <script type="text/javascript" src="http://www.zzjs.net/ad/tc.js"></script> <div id="test" style="background:#f1f1f1;border:1px #000 dotted">站长特效提示您:这里不能用鼠标选择</div> <script type="text/javascript"> var somediv=document.getElementById("test") disableSelection(somediv) //disable text selection within DIV with id="mydiv" </script> </body> </html>
提示:你可以先修改部分代码再运行。
标签:
金泉涞饮水机,商务饮水机,节能饮水机,学校饮水机,ic卡饮水机, 饮水机厂家,加盟饮水机行业,首选金泉涞!
I went to tons of links bfreoe this, what was I thinking?
3Q
不错的博客,支持一下。
吃过饭,上来看看。
姓名
邮件
验证 (2+3)
网址 (可选)
I went to tons of links bfreoe this, what was I thinking?
3Q
不错的博客,支持一下。
吃过饭,上来看看。