<html>
<head>

<script language="JavaScript1.2">
//Disable select-text script (IE4+, NS6+)- By Andy Scott

function disableselect(e){
return false
}
 function reEnable(){
  return true
}

//if IE4+
 document.onselectstart=new Function ("return false")

//if NS6
 if (window.sidebar){
  document.onmousedown=disableselect
  document.onclick=reEnable
 }
</script>

</head>

<body>
 Try to select this text<br>
 What no select yes I think its useful! 
</body>
Published in: JavaScript
Download

Related snippets