Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/06/2011, 11:00
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 14 años
Puntos: 192
Respuesta: Ocultar texto con *****

¿Qué tal algo así?
http://jsbin.com/eweti5

Código:

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
  3.   #mensaje{
  4.     background:transparent;
  5.     color:inherit;
  6.     border:0;
  7.     outline:0;
  8.   }
  9.   $(function(){
  10.     var input_mensaje = $('#mensaje');
  11.     var mensaje = input_mensaje.val();
  12.     var oculto = mensaje.replace(/./g,'*');
  13.     input_mensaje.select(function(){
  14.       $(this).val(mensaje);
  15.     }).val(oculto).focusout(function(){
  16.       $(this).val(oculto);
  17.     });  
  18.   });  
  19. </head>
  20.   <input type="text" id="mensaje" value="Mensaje Escondido" />
  21. </body>
  22. </html>

Tiene sus limitaciones, claro. Podría trabajarse un poco más y tratar de obtener el texto que se ha seleccionado, aunque eso es un trabajo difícil de compatibilidad cross-browser.
__________________
nahueljose.com.ar