Good afternoon, I'm studying ajax and I'm trying to make an input pass to a file via post, but nothing happens .. I'm tracking via chrome firebug and I always see the type: 'post' is in error.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script><script>functionajax(nome){info={"nNome" : nome};
$.ajax({
type: 'post';
url: "arquivo.php";
data: info,
}).done(function(data) {
data = $.parseJSON(data);
$(".resultado span.nome").text(data.nNome);
});
}
$(document).ready(function(){
$("input[name=Enviar]").click(function(){
var nome = $("input[name=nome]").val();
});
});
</script>
<form>
<label>Entre com seu nome:</label>
<input type="text" name="nome"><br>
<input type="button" name="Enviar" value="Enviar">
</form>
<div class="resultado">
Olá, <span class="nome"></span>
</div>