Forum » » Questions » » Limiter la copie de texte
Posté : 22 mars 2015 à 12:51
<script type="text/!javascript!">
/***********************************************
Désactiver copie de texte
***********************************************/
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.!onmouse!down=disableselect
document.!onmouse!up=reEnable
}
</script>
Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=26287&forum=9