Query Wikipedia's API using AJAX (XMLHttpRequest)
问题 I am trying to implement a simple request to Wikipedia's API using AJAX (XMLHttpRequest). If I type the url in the address bar of Firefox, I get a neat XML, no sweat there. Yet, calling the exact same url with: // this is my XMLHttpRequest object httpObjectMain.open("GET", "http://en.wikipedia.org/w/api.php?action=query&format=xml&prop=langlinks&lllimit=500&titles=kaas", true); httpObjectMain.send(null); returns an empty response. According to FireBug, I get a 200 OK response, but the content