Script to disable right click on a webpage
This script is not a security for your data on webpage, this script can be useful to some extent for users only. but this function just annoy's your user's.
Thers is only one way to stop users taking/copying your content taken, you should not post it on the web. :)
1) <body oncontextmenu="return false;">
place oncontextmenu="return false;" inside your opening body tag.
1) <body oncontextmenu="return false;">
place oncontextmenu="return false;" inside your opening body tag.
2) put this head section of your webpage.
<script type="text/javascript">
function disableselect(e){
return false
}
function reEnable(){
return true
}
//for IE4+
document.onselectstart=new Function ("return false") document
document.oncontextmenu=new Function ("return false")
//for NS6
if (window.sidebar){ document
document.onmousedown=disableselect document
document.onclick=reEnable
}
</script>
0 comments:
Post a Comment