
22/04/2005, 00:53
|
 | Moderador | | Fecha de Ingreso: abril-2002 Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses Puntos: 1284 | |
Hola otra vez:
Una versión con retardo, parecida:
Código:
<html>
<head>
<script type="text/javascript">
function limpiarTexto(miId) {
yo = document.getElementById(miId);
if (yo.value != "")
yo.value = yo.value.substring(1);
if (yo.value != "")
setTimeout("limpiarTexto('" + miId + "')", 100);
}
function restaurar(miId, que) {
yo = document.getElementById(miId);
yo.value += que.charAt(yo.value.length);
if (yo.value != que)
setTimeout("restaurar('" + miId + "', '" + que + "')", 100);
}
</script>
</head>
<body>
<form>
<textarea id="pepe" size="50"
onfocus="if (this.value == ' comentario ') limpiarTexto(this.id)"
onblur="if (this.value != ' comentario ') restaurar(this.id, ' comentario ')"
> comentario </textarea>
<input type="text" id="paco" size="50" value=" url "
onfocus="if (this.value == ' url ') limpiarTexto(this.id)"
onblur="if (this.value != ' url ') restaurar(this.id, ' url ')"
/>
</form>
</body>
</html>
Saludos
__________________ Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo |