Ver Mensaje Individual
  #8 (permalink)  
Antiguo 08/06/2008, 19:54
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Aplicar protejer texto SOLO a cierta parte NO a toda la página

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>