YUI().use("event",function(Y){ Y.on("load",function(){ YUI().use("jsonp", "node-base", function (Y) { var handler = function (response) { Y.one("#show").append("<p>" + response.result + "</p>"); Y.jsonp("http://127.0.0.1:1387/?callback={callback}", arguments.callee); }; Y.jsonp("http://127.0.0.1:1387/?callback={callback}", handler); }); },window); });
?
关键是 load事件