Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function(){
- $("#formulario").on("submit", function(e){
- e.preventDefault();
- var cdb = $("#cdb").val();
- $.ajax({
- url: "confere.php",
- method: "POST",
- dataType: "html",
- data: {cdb: cdb}
- }).done(function(data){
- $("#cdb").val("");
- $("#cdb").focus();
- listar();
- }).fail(function(data){
- alert("Erro");
- });
- });
- });
- function listar() {
- $.ajax({
- url:"lista.php",
- success: function (textStatus) {
- $('#lista').html(textStatus);
- }
- });
- }
- </script>
Add Comment
Please, Sign In to add comment