getJSON data from another domain - Javascript jQuery

Javascript examples for jQuery:Json

Description

getJSON data from another domain

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-1.8.3.js"></script> 
  <script type="text/javascript">
$(function() {/*  ww  w  .ja v  a  2 s . c o  m*/
    $.getJSON("http://your server", function(data) {
        $("#data2").text(data.Id);
    });
});

      </script> 
 </head> 
 <body> 
  <div id="data2"></div>  
 </body>
</html>

Related Tutorials