Code or script "Loading..."

Asked

Viewed 66 times

-3

I would like to know what code or script to appear that famous phrase (Carrying...).

Can someone help me?

  • 1

    at least specify the environment or language

1 answer

1

can be done with ajax when loading requests

$('document').ready(function(){

        $("#btn-login").click(function(){
            var data = $("#login-form").serialize();

            $.ajax({
                type : 'POST',
                url  : '../php/seila.php',
                data : data,
                dataType: 'json',
                beforeSend: function()
                {   
                    $("#btn-login").html('Carregando...'); <---
                },
                success :  function(response){                      


                }
            });
        });

    });     

Browser other questions tagged

You are not signed in. Login or sign up in order to post.