Grabbing JSON data with AJAX - Javascript jQuery

Javascript examples for jQuery:Json

Description

Grabbing JSON data with AJAX

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
$.ajax({//from  w  w w  .j  av  a2s.c  o m
    url: "http://your server",
    dataType: 'jsonp',
    success: function (data) {
        console.log(arguments);
        console.log(data.data[0].title);
    }
});
    });

      </script> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials