-
-
Save jhowbhz/69d95c9801eadf842ec09b3e0302781d to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<title> TESTE AJAX </title> | |
<body> | |
<button onclick="nome_da_funcao()">CLIQUE AQUI</button> | |
<div id="teste"> </div> | |
</body> | |
</html> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script> | |
function nome_da_funcao(){ | |
$.post("pagina.php", function(data, status){ | |
$('#teste').html(data) // escreve o restorno dentro da div | |
}); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment