xhr dojo load

require(["dojo/_base/xhr"],
 function(xhr) {
  // Execute a HTTP GET request
  xhr.get({
      // The URL to request
      url: "get-message.php",
      // The method that handles the request's successful result
      // Handle the response any way you'd like!
      load: function(result) {
         alert("The message is: " + result);
      }
  });
 
});
posted @ 2016-09-07 16:04  乌祁班岚图  阅读(131)  评论(0编辑  收藏  举报