Monday, January 30, 2012

How To Disable Copy and Paste from your Website

This little Javascript code prevents your visitors to copy content from your website or blog.
Just copy and paste this code into the <head> section of your website's code and see the magic. :-)





<script type="text/JavaScript">
//courtesy of BoogieJack.com
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>

1 comment:

  1. It doesn't work in firefox.
    It disable to write anything in textbox

    ReplyDelete

Any Thoughts?