Entries Profile stuff Affies Credit

<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d6253663951978302670\x26blogName\x3d//Yi+Qing.com\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://joey98place.blogspot.com/search\x26blogLocale\x3dzh_CN\x26v\x3d2\x26homepageUrl\x3dhttp://joey98place.blogspot.com/\x26vt\x3d-8461348219948985447', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>
封锁right click 功能-->6款
8.06.2011, 8/06/2011 - Permalink | 0 Comments

第一款
这款呢、是禁止拷贝文字.
首先、按着ctrl+f找
<head> 过后在它的右边paste以下代码
<script language="JavaScript">
document.oncontextmenu=new Function("event.returnValue=false;");
document.onselectstart=new Function("event.returnValue=false;");
</script>

 保存、即可.

第二款

这款呢、是博主我最不鼓励的一款.
因为这是完完全全禁止右健功能.
功能是完全禁止右健+highlight+ctrl+c.
使用后、可能连鼠标也没办法用噢.

按ctrl+f找
<head> 过后也是把代码放在右边.
<body oncontextmenu='return false' onmousedown='return false' onselectstart='return false'>
保存、即可.

第3款

这款呢、是当你按右健时、有弹窗的. 把它放进html java script
<script language="JavaScript"></p><p style="text-align: center;"><!--</p><p style="text-align: center;"><br></p><p style="text-align: center;">//Disable right mouse click Script</p><p style="text-align: center;"><br></p><p style="text-align: center;">var message="你的文字在这里";</p><p style="text-align: center;"><br></p><p style="text-align: center;">///////////////////////////////////</p><p style="text-align: center;">function clickIE4(){</p><p style="text-align: center;">if (event.button==2){</p><p style="text-align: center;">alert(message);</p><p style="text-align: center;">return false;</p><p style="text-align: center;">}</p><p style="text-align: center;">}</p><p style="text-align: center;"><br></p><p style="text-align: center;">function clickNS4(e){</p><p style="text-align: center;">if (document.layers||document.getElementById&&!document.all){</p><p style="text-align: center;">if (e.which==2||e.which==3){</p><p style="text-align: center;">alert(message);</p><p style="text-align: center;">return false;</p><p style="text-align: center;">}</p><p style="text-align: center;">}</p><p style="text-align: center;">}</p><p style="text-align: center;"><br></p><p style="text-align: center;">if (document.layers){</p><p style="text-align: center;">document.captureEvents(Event.MOUSEDOWN);</p><p style="text-align: center;">document.onmousedown=clickNS4;</p><p style="text-align: center;">}</p><p style="text-align: center;">else if (document.all&&!document.getElementById){</p><p style="text-align: center;">document.onmousedown=clickIE4;</p><p style="text-align: center;">}</p><p style="text-align: center;"><br></p><p style="text-align: center;">document.oncontextmenu=new Function("alert(message);return false")</p><p style="text-align: center;"><br></p><p style="text-align: center;">// --></p><p style="text-align: center;"></script></p><p style="text-align: center;"><br></p><p style="text-align: center;">

保存、即可.

第4种

完全封锁right click 功能.
CTRL + F 找以下字。
<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>

<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
删掉,换成以下代码

<body onmousedown="return false" oncontextmenu="return false" onselectstart="return false">

第5种、

封锁Highlight.
把以下代码放进HTML/JAVASCRIPT
<script type="text/javascript"> 
/*********************************************** 
* Disable Text Selection script- &#169; Dynamic Drive DHTML code library (www.dynamicdrive.com) 
* This notice MUST stay intact for legal use 
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code 
***********************************************/ 
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" 

//Sample usages 
//disableSelection(document.body) //Disable text selection on entire body 
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv" 
</script> 
<script type="text/javascript"> 
disableSelection(document.body) //disable text selection on entire body of page 
</script>

 第6种、

封锁图片、 就是有了这个代码后、
任何人都不能偷你的图片了、

把以下代码放进 HTML/JAVASCRIPT
<script type='text/javascript'>


document.ondragstart = function () { return false; }; </script>

<SCRIPT TYPE='text/javascript'>

<!--

//Disable right click script

//visit http://www.rainbow.arch.scriptmania.com/scripts/

var message="Sorry, right-click has been disabled";

///////////////////////////////////

function clickIE() {if (document.all) {(message);return false;}}

function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</SCRIPT>

SAVE.
Then Okay.

标签:





T i m e M a c h i n e