Thursday 9 March 2017

Prevent Copy , Paste , Select Text from Website

People making blogs always look for protection for data being reused. There are multiple solutions available in the market with requirement set. One simple way to prevent users copy paste and even select function is to add a HTML script at end of the page.

<script
src="demo-to-prevent-copy-paste-on-blogger_files/googleapis.js">
</script><br /><script type="text/javascript">
if (typeof document.onselectstart!="undefined" ) {
document.onselectstart=new Function ("return false" ); } else{
document.onmousedown=new Function ("return false" );
document.onmouseup=new Function ("return true" ); }
</script>

Place this script at every end of the page that you want to protect.



No comments:

Post a Comment