<!DOCTYPE html>
<html>
<head>
<meta "charset=utf-8" />
<title>Cadastro</title>
<link rel="stylesheet" type="text/css" href="assets/css/theme.css"/>
<script src="assets/js/jquery.js"></script>
<!--Arquivo Ajax-->
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#ajax_form').submit(function(){
var dados = jQuery( this ).serialize();
jQuery.ajax({
type: "POST",
url: "newsletter-form.php",
data: dados,
success: function envio()
{
var cont = "Email enviado com sucesso";
document.getElementById("msg").innerHTML = cont;
}
});
return false;
});
});
</script>
</head>
<body>
<div class="for"
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<form id="ajax_form" name="signup" method="post" action="cadastro.php">
<div class="form-group">
<input type="text" id="name_user" class="form-control" name="nome" required placeholder="Seu nome"/>
</div>
<div class="form-group">
<input type="email" id="email_user" class="form-control" name="email" required placeholder="Seu email"/>
</div>
<div class="form-group">
<input type="tel" id="telefone_user" class= "form-control" name="telefone" required placeholder="Seu telefone"/>
</div>
<button class="btn btn-primary btn-block btn-register">
Enviar
</form>
<!-- coloco as divs que quero o resultado como hidden -->
<div class="menu" hidden>enviado com sucesso!</div>
<div id="atuar" hidden ><a href="https://google.com"><input type="button" value="download"></a></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>