hola ::)
aqui tengo un problema con el metodo lenght me retorna undefined no se poque sin tanto rodeos aqui esta el codigo
inde.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Validar formulario</title>
<link rel="stylesheet" href="style.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<form class="formulario" action="index.php" method="post">
<label for="nombre" > Ingrese Nombre</label>
<input type="text" name="nombre" id="nombre"/>
<br/ ><br/>
<button type="button" name="button">Enviar</button>
</form>
</body>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="script.js" charset="utf-8"></script>
</html>
script
$( "#nombre" ).keyup(function() {
var value = $(this ).val();
var n2 = value.lenght;
//muestra undefined
// console.log(n2);
alert(n2);
});
yo se que no es un gran formulario lo que trato de hacer es una validar que el nombre tienga un n tamano ect....
pero siempre me muestra esa palabra undefined no me explico alguna ayuda? ;-)
Pues porque es
value.length
gracias ya veo ajajaj
yo creo que estoy ciego ajajaj :o