Prev Demo
jQuery
>
.Ajaxstart() - Register Handler When 1St Ajax Request Begins
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <div id="lblLoading"> <label>Ajax Page Starts.</label> </div> <form method="post" action="somepage.html"> <input type="button" id="divAjaxStart" name="btn" value="Start Ajax" /> </form> <script> $(document).ajaxStart(function () { $("#divAjaxStart").text("Loading ..."); // $("#lblLoading").text("Loading.. keep patience, have a tea and come back..."); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output