Read div value from webpage
<p>I haven't really found anything about this. I want to read data from a website. From my webpage I can read a div's value with </p>

<pre><code>&lt;div class="tools"&gt;hammer&lt;/div&gt;

var divs = document.getElementsByTagName("div");
    for(var i=0; i&lt;divs.length; i++ ) {
        if(divs[i].className == "tools") {
            alert(divs[i].innerHTML);
        }
    }
</code></pre>

<p>Is it possible to set the URL of the desired webpage so this code would scrape that page? I know the classname and the url.</p>

<p>Based on @cereallarceny's answer I created this code block but I see no alert when running the script:</p>

<pre><code>$.ajax({
type: 'get',
url: 'https://play.google.com/store/apps/details?id=com.viber.voip',
crossDomain: true, //Very important, ensures you can get data from a domain that isn't your own!
success: function() {
  var divs = document.getElementsByTagName("div");
    for(var i=0; i&lt;divs.length; i++ ) {
        if(divs[i].className == "votes") {
            alert(divs[i].innerHTML);
        }
    }
}
});
</code></pre>
