I would like to know the method of editing the page and leave the content I've edited fixed there forever, as if it were a post.
I've tried this:
<style type="text/css">
.aprovado{
background-color: #060;
color: #FFFFFF;
}
.reprovado{
background-color: #f22;
color: #E2E2E2;
}
</style>
< script type="text/javascript" src="jquery-min.js"></script>
< script type="text/javascript">
$(function(){
$("#btn").click(function(){
$("#resposta").removeClass();
var nome = $("#txtnome").val();
var n1 = parseFloat ($("#txtn1").val());
var n2 = parseFloat ($("#txtn2").val());
var media = (n1 + n2) / 2;
$("#resposta").html(nome + ", " + media);
if(media >= 7){
$("#resposta").addClass("aprovado");
}else{
$("#resposta").addClass("reprovado");
}
});
});
</script>
<h3>Ver Dados do Aluno</h3>
<form>
Nome: <input type="text" name="nome" id="txtnome" />
<br /><br />
Nota1: <input type="text" name="n1" id="txtn1" />
<br /><br />
Nota2: <input type="text" name="n2" id="txtn2" />
<br /><br />
<input type="button" value="Enviar Dados" id="btn" />
</form>
<div id="resposta"></div>
It works, but when updating the page some, but how do I save the changes just using AJAX and jQuery?