Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = 'works.json';
- var XHR = ("onload" in new XMLHttpRequest()) ? XMLHttpRequest :
- XDomainRequest;
- var xhr = new XHR();
- xhr.open('GET', url, true);
- xhr.onload = function() {
- console.log(JSON.parse(this.responseText));
- }
- xhr.send();
- $.getJSON('works.json', function(data){
- console.log(data);
- });
- chrome.exe --allow-file-access-from-files --disable-web-security
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement