Diferencia entre revisiones de «Usuario:ManuelRomero/JavaScript/jquery/validate/solucionEJ4»
De WikiEducator
< Usuario:ManuelRomero | JavaScript | jquery | validate
| Línea 1: | Línea 1: | ||
[[Usuario:ManuelRomero/JavaScript/jquery/validate|<font size=5 color=red>VOLVER</font>]] | [[Usuario:ManuelRomero/JavaScript/jquery/validate|<font size=5 color=red>VOLVER</font>]] | ||
| − | + | <!-- | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
<source lang=html5> | <source lang=html5> | ||
<!doctype html> | <!doctype html> | ||
| Línea 70: | Línea 66: | ||
</source> | </source> | ||
| + | --> | ||
Última revisión de 13:37 14 abr 2016
<style>
.important{color:red; font-weight:bold;}
label{display:inline-block; width:200px;}
input[type="submit"]{margin-left:200px;}
</style>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="jquery.validate.js"></script>
</head>
<body>
<form id="formulario" novalidate action="accion.php" method="post">
<label for="nombre">Nombre:
*
</label>
<input type="text" id="nombre" name="nombre" />
<label for="email">E-mail:
*
</label>
<input type="email" id="email" name="email" />
<label for="url">Url:</label>
<input type="url" id="url" name="url" />
<label for="comentarios">Comentarios:</label>
<textarea id="comentarios" name="comentarios"></textarea>
<input type="submit" value="Enviar" />
</form>
<script>
$("#formulario").validate({
onkeyup: false,
onfocusout: false,
onclick: false,
rules: {
nombre: {
required: true,
minlength: 2
},
email: "required",
comentarios: "required"
}
});
</script>
</body>
</html>
</source> -->