No Text Selection Script

<script language=”JavaScript1.2″>

// prevent text selection script
<!– begin
function disableselect(e){
return false;
}
function reEnable(){
return true;
}
document.onselectstart=new Function (“return false”);
if (window.sidebar){
document.onmousedown=disableselect;
document.onclick=reEnable;
}
// end –>
</script>

This script will allow your pages not to be selected or prevent users from copying text in your webpage. This was just requested so I decided to post this code, I got this from a tutorial site way back 2003. I have forgotten the site; just search it over the net. Enjoy: D

Advertisements

Published by: madshock

Blogger, Web / Creative Designer, Digital Marketer, Branding, Social Media Manager for Startups, Small Businesses and Growing Companies. Founder/CEO of Humane Strategic Consulting.

Categories Internet1 Comment

One thought on “No Text Selection Script”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s