Disable Ctrl + C and Drag

Chapfallen articles because you often imitated as other people? sometimes we also often made chapfallen same blogger who like to play another copy and paste the article, especially if not installed the original source article. stingy and if you do want the same article is another blogger I recommend you attach the script code articles. Let's go start


1. Log In Blogger


2. Select the Layout / Edit HTML


3. Backup your template


4. Add the code below into the <head>



<script type='text/javascript'>


/***********************************************

* Disable Text Selection script- © 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>



5. Save Setting


See the results


LIVE DEMO

Comments :

0 comments to “Disable Ctrl + C and Drag”

Post a Comment

 

Followers

About Me