Ver Mensaje Individual
  #6 (permalink)  
Antiguo 31/01/2011, 06:48
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 16 años, 8 meses
Puntos: 1012
Respuesta: Reaccionar según el texto.

prueba usando los métodos test() y replace()
Cita:
<input type="text" onkeyup="if (!/^http:\/\//.test(this.value)) {this.value= this.value.replace(this.value, function(url){return 'http://'+url});}" value="" />