Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Login</title>
- </head>
- <body style="background-color:#68eff1;">
- <div id="info"></div>
- <script type="text/javascript">
- var user=document.form1.user.value;
- var pass=document.form1.password.value;
- var datosJSON = '{"usuario" : "user", "contraseña" : "pass"}';
- function mostrar(datos.JSON){
- document.write(datos.JSON.usuario);
- document.write(datos.JSON.contraseña);
- };
- </script>
- <form name="form1">
- <P>User: <INPUT type=text name=user placeholder="User">
- <P>Password: <INPUT type=text name=password placeholder="Password">
- <P>
- <input type="button" name="miboton" id="boton" value="Enviar" onClick="mostrar(datos.JSON)" />
- </form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment