Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang = "es">
- <head>
- <meta charset = "UTF-8" />
- <title>Orion</title>
- <style type="text/css">
- .labels *, .inputs *{
- display: block;
- margin-bottom: .5em;
- }
- .labels, .inputs{
- display: inline-block;
- }
- [type=submit]{
- display: block;
- }
- </style>
- </head>
- <body>
- <form id = "miFormulario" method = "post" action = "destino.php">
- <section class = "labels">
- <label for = "nombre">Nombre:</label>
- <label for = "edad">Edad:</label>
- </section>
- <section class = "inputs">
- <input type = "text" id = "nombre" name = "nombre" placeholder = "Ingrese su nombre" autofocus />
- <input type = "text" id = "edad" name = "edad" placeholder = "Ingrese su edad" />
- </section>
- <input type = "submit" value = "Enviar" />
- </form>
- <p id = "salida"></p>
- <script language = "javascript" type = "text/javascript" src = "http://orion.byethost24.com/Orion/orion.js"></script>
- <script language = "javascript" type = "text/javascript">
- Orion("#miFormulario").enviar(function(event){
- event.preventDefault();
- Orion.ajax({
- uri: Orion(this).prop("action"),
- metodo: Orion(this).prop("method"),
- tipo: "HTML",
- datos: Orion(this).serializar(),
- exito: function(respuesta){
- Orion("#salida").valor(respuesta);
- },
- error: function(textoError){
- Orion("#salida").valor(textoError);
- }
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement