Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head></head>
- <body>
- <nav>
- <ol class="menu">
- <li>Navegación 1</li>
- <li>Navegación 2</li>
- <li>Navegación 3</li>
- <li>Navegación 4</li>
- </ol>
- </nav>
- <hgroup>
- <h1>Formularios</h1>
- <h2>html5 power</h2>
- </hgroup>
- <p>Lorem ipsum dolor sit amet, hola mundo vestrum appellas fortunae civitatem auri in fuerat est se ad quia ad te in deinde cupis hominem armatis exanimem scientiam pervenisset afferte Apollonius ut sua etiam esse in fuerat accidens quam aniculae morsque nutricem rex</p>
- <form action="ok.html">
- Obligatario:
- <input name="campoObligatorio"
- type="text"/>
- <br/>
- Email:
- <input type="text" name="correo"
- />
- <br/>
- Teléfono:
- <input type="text" />
- <br/>
- Número:
- <input type="text" />
- <br/>
- Meter:
- 50 sobre 100
- <br/>
- Progress:
- Cargando...
- <br/>
- Search:
- <input type="text" />
- <input type="submit" name="aceptar"
- value="Aceptar" />
- <input type="submit" name="cancelar"
- value="cancelar" />
- <input type="button" name="checkCorreo"
- value="Comprobar Correo"
- />
- </form>
- <script>
- document.forms[0].onsubmit = function() {
- var validacion = this.correo.validity;
- var mensaje = '';
- for (key in validacion) {
- if (validacion.hasOwnProperty(key) == true) {
- mensaje += key + ':' + validacion[key]
- +'\n'
- }
- }
- window.alert(mensaje);
- return false;
- return true;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement