Source

scope.bitbucket.org / tests / cross-origin / index.html

<!doctype html>
<title>Test cross origin policy</title>
<script>
window.onload = function()
{
  var x = new XMLHttpRequest();
  x.onload = function()
  {
    document.querySelector("pre").textContent = "success, response text:\n" +  this.responseText;
  }
  x.open("GET", "http://graph.facebook.com/fql");
  x.send();
}
</script>
<pre></pre>