Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/02/2008, 09:56
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Re: Pregunta Simple Con Formulario PHP y JavaScript

Hola basura1973

Prueba esto:

Código:
<html>
<head>
<title>Titulo</title>
</head>
<script type="text/javascript">
function ingresar(frm )
{
if (frm.valor.value=="")
{
alert ("Por favor ingrese un valor");
return false;
}
}
</script>
<body>
<form name="form1" method="post" action="confirmacion.php" onsubmit="return ingresar(this)">
<p>Valor:
<input name="valor" type="text" id="valor">
</p>
<p>
<input name="enviar" type="submit" id="enviar" value="enviar">
</p>
</form>
<p>
</html>
Saludos,