Js代码 复制代码 代码如下: // dojo.io.script is an external dependency, so it must be required dojo.require("dojo.io.script");
// When the resource is ready dojo.ready(function() {
// Use the get method dojo.io.script.get({ // The URL to get JSON from Twitter url: "http://search.twitter.com/search.json", // The callback paramater callbackParamName: "callback", // Twitter requires "callback" // The content to send content: { q: "Arsenal" }, // The success callback load: function(tweetsJson) { // Twitter sent us information! // Log the result to console for inspection console.info("Twitter returned: ",tweetsJson); } }); });