![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
16/05/2005, 21:58
|
| | Fecha de Ingreso: diciembre-2004
Mensajes: 96
Antigüedad: 20 años, 1 mes Puntos: 0 | |
porke si a eso te refieres ke el campo del formulario no este vacio te doy la siguiente opcion
<html>
<head>
<title>Validar formulario</title>
<script>
function validar()
{
if(nombre_formulario.nombre_campo.value =="")
{
alert('Error: debe de ingresar información en el campo x');
nombre_formulario.nombre_campo.focus();
return (false);
}
return true;
}
</script>
</head>
<body>
<form name="nombre_formulario" id="nombre_formulario" method="post o get" action="a donde vaya a ir">
<input name="nombre_campo" id="nombre_campo" type="textfield" size="20" value="">
<input name="submit" id="submit" type="submit" onclick="verifica();">
</form>
</body>
</html> |