1: jQuery.getScript('http://www.geoplugin.net/javascript.gp', function()
2: {3: $('#getScript-results').html("Your location is: " + geoplugin_countryName() + ",
4: " + geoplugin_region() + ", " + geoplugin_city());
5: });
Data Json result
function geoplugin_request() { return '117.5.192.65';}
function geoplugin_status() { return '200';}
function geoplugin_city() { return 'Hanoi';}
function geoplugin_region() { return 'Ha Nội';}
function geoplugin_regionCode() { return '44';}
function geoplugin_regionName() { return 'Ha Nội';}
function geoplugin_areaCode() { return '0';}
function geoplugin_dmaCode() { return '0';}
function geoplugin_countryCode() { return 'VN';}
function geoplugin_countryName() { return 'Vietnam';}
function geoplugin_continentCode() { return 'AS';}
function geoplugin_latitude() { return '21.033300';}
function geoplugin_longitude() { return '105.849998';}
function geoplugin_currencyCode() { return 'VND';}
function geoplugin_currencySymbol() { return '₫';}
function geoplugin_currencyConverter(amt, symbol) {
if (!amt) { return false; }
var converted = amt * 20810;
if (converted <0) { return false; }
if (symbol === false) { return Math.round(converted * 100)/100; }
else { return '₫'+(Math.round(converted * 100)/100);}
return false;
}
Categories:
jQuery
0 comments:
Post a Comment