Created
September 10, 2010 09:38
-
-
Save swaydeng/573380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('yql', function(Y) { | |
Y.YQL('select * from weather.forecast where location=90210', function(r) { | |
var results = r.query.results | |
//results就是你所关心的数据 | |
//现在你可以用它做任何事情 | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8" | |
src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function loveData(r){ | |
var results = r.query.results; | |
alert(results); | |
} | |
</script> | |
<script type="text/javascript" src="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22waterfall%22%20limit%2010&format=json&callback=loveData"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment