Created
June 13, 2018 14:59
-
-
Save clubeagn/493b50de9e4a3aede43b1772eb60bd48 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