JSFiddle - React, Tailwind, and code Playground

HTML

<button id="a">click me</button>

JavaScript

function get_url(remote_url) {
    $.ajax({
        url: "http://query.yahooapis.com/v1/public/yql?"+
"q=select%20*%20from%20html%20where%20url%3D%22"+
encodeURIComponent(remote_url)+
"%22&format=json",
        type: 'get',
        dataType: 'jsonp',
        success: function(data) {
            alert(data.query.results.body.p);
        },
        error: function(jqXHR, textStatus, errorThrow){
            alert(jqXHR['responseText']);
        }
    })
}

$('#a').click(function() {
    get_url('http://ichart.finance.yahoo.com/table.csv?format=json&s=GS&amp;a=00&amp;b=1&amp;c=2010&amp;d=08&amp;e=3&amp;f=2012&amp;g=d&amp;ignore=.csv');
});