Making some calls

This is a test of making some sample web service requests. It demonstrates that code sandboxes like this one have trouble with JSONP $.get().

by thdoan

HTML

<textarea id="output1" rows="10" cols="60"></textarea>
<textarea id="output2" rows="10" cols="60"></textarea>
<textarea id="output3" rows="10" cols="60"></textarea>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

JavaScript

$.getJSON('//freegeoip.net/json/?callback=?', function(data) {
  $('#output1').text(JSON.stringify(data, null, 2));
});
$.getJSON('//www.geoplugin.net/json.gp?jsoncallback=?', function(data) {
  $('#output2').text(JSON.stringify(data, null, 2));
});
$.getJSON('//ipinfo.io/', function(data) {
  $('#output3').text(JSON.stringify(data, null, 2));
});