Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/07/2011, 19:38
3dw4rd
 
Fecha de Ingreso: julio-2011
Mensajes: 20
Antigüedad: 12 años, 9 meses
Puntos: 2
No me funciona este simple codigo

<html>
<head>
<script type="text/javascript">
function mostrar(){
var t=document.texto.value;
alert(t);
}
</script>
</head>
<body>
<input type="text" name="texto">
<input type="button" value="Mostrar" onclick="mostrar()">
</body>
</html>


Se supone que ingreo un texto al input name="texto" y luego mostrarlo en una ventana alert de JavasCript, pero no pasa nada, ¿cual sera el error?