Created
November 11, 2016 14:23
-
-
Save Marcelosilva10/01af8da7a5e8e5968e5f986a2a8d14aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<title>Formulário Weeazy</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/style.css"> | |
<link rel="shortcut icon" type="image/png" href="img/favicon.png"/> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="absolute-center is-responsive"> | |
<div id="logo-container"></div> | |
<div class="col-sm-12 col-md-10 col-md-offset-1"> | |
<form method="POST" id="myForm"> | |
<div class="form-group input-group"> | |
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> | |
<input class="form-control" id="MAIL" type="email" name='email' placeholder="[email protected]" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"/> | |
</div> | |
<div class="form-group input-group"> | |
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> | |
<input class="form-control" id="PASS" type="password" name='password' placeholder="password" min="6"/> | |
</div> | |
<div class="form-group"> | |
<button type="button" class="btn btn-block" id="enviar">Login</button> | |
</div> | |
</form> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script src="js/post_weeazy_teste.js"></script> | |
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<!-- Include all compiled plugins (below), or include individual files as needed --> | |
<script src="js/bootstrap.min.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#myForm').button (function(e){ | |
e.preventDefault(); | |
if ($('#enviar').val("Não enviou")) { | |
return(false); | |
} | |
$('#enviar').val("Enviando"); | |
$.ajax({ | |
url: 'https://www.weeazy.com/prova/front-end/login.php', | |
type: 'post', | |
dataType: 'json', | |
data: { | |
'MAIL': $('#MAIL').val(), | |
'PASS': $('#PASS').val() | |
} | |
}).done(function(data){ | |
alert(data); | |
$('#enviar').val("Enviar dados"); | |
$('#MAIL').val(), | |
$('#PASS').val() | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment