Hola, IMAC, hay varias opciones. Te muestro 2. Tendrás que optar por la que te sea más cómoda:
Una sería esta:
Código PHP:
<!--arriba el resto de tu estructura-->
<script>
function noSel() {
this.onselectstart = function() {
return false;
};
this.unselectable = "on";
this.style.MozUserSelect = "none";
this.style.cursor = "default";
}
window.onload=function(){
noSel.call(document.getElementById('ejemplo'));
MM_preloadImages('imgs/pepitocomepan.gif');
}
</script>
</head>
<body bgcolor="#000000">
<div id="ejemplo">Texto no seleccionable. </div>
<div>Texto seleccionable. </div>
</body>
</html>
Otra sería:
Código PHP:
<!--arriba el resto de tu estructura-->
<script>
function noSel() {
this.onselectstart = function() {
return false;
};
this.unselectable = "on";
this.style.MozUserSelect = "none";
this.style.cursor = "default";
}
</script>
</head>
<body bgcolor="#000000" onload="MM_preloadImages('imgs/pepitocomepan.gif')">
<div id="ejemplo">Texto no seleccionable. </div>
<div>Texto seleccionable. </div>
<!--resto de tu código-->
<script>
noSel.call(document.getElementById('ejemplo'));
</script>
</body>
</html>