jQuery Ajax Basic Example


Ajax : Ajax stands for Asynchronous Javascript And Xml. Ajax is used to load data from server without reloading the whole page. In short Ajax loads data from server and updates in the specified part of the page. Now we will give a short jQuery Ajax Basic Example for beginners with syntax.


How to use jQuery with Ajax?

Here we are going to show very basic example of the Ajax using .load() method which will load data from server without the page reload.

jQuery Ajax Basic Example

<script type="text/javascript">
         $(document).ready(function(){ 
              $( "#ajaxExample" ).on( "click", function(event) {             
                          var uri = 'http://runtest.tutorialsplane.com/';
                          $("#myDiv").load(uri+"test.html");     
              });               
          });
</script>

Try it »


Advertisements

Add Comment

📖 Read More