Home » JavaScript »

2

Hi friends,

After working hard to complete your  design and images  ,some persons just save that images and web pages.

This is one  idea to disable the right click on webpage.

just put a small javascript code at the place between the head section.

*************************

<SCRIPT LANGUAGE=”JavaScript”>
<!– Disable
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function (“return false”)
document.oncontextmenu=new Function (“return false”)
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//–>
</script>

*****************************

Demo at @ http://labs.anil2u.info/disable-rightclick.php


Related Posts

    Steps to implement and hosting your website in google app engine for freeHow to convert feeds to html using javascript and phpPHP Header ExamplesSimple JavaScript validation for dates

 

2 Comments

  1. Nice tip anil.. Are you interested to write an artilce on my blog..

    Just togeather all your old post. Sure your blog traffic increase through my blog

  2. Sumeet says:

    Thanx champ, Thanx a lot for all your good work. Keep Posting.

Leave a Reply