jsonp test
JavaScript
function getQuote(obj) {
var arrayLength = obj.list.resources.length;
for (var i = 0; i < arrayLength; i++) {
document.getElementById("ip").innerHTML += "<br>" + obj.list.resources[i].resource.fields.name;
//Do something
}
console.log(obj)
}
var url = "http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json&view=basic&callback=getQuote"
var script = document.createElement('script');
script.setAttribute('src', url);
document.getElementsByTagName('head')[0].appendChild(script);