Created
January 4, 2012 02:10
-
-
Save lizheming/1558083 to your computer and use it in GitHub Desktop.
jQ显示新浪微博消息
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
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="sina"></div> | |
<script type="text/javascript"> | |
$(function() { | |
$.getJSON('https://api.weibo.com/2/statuses/user_timeline.json?source=2546437393&screen_name=mattdallas&callback=?', function(content){ | |
var statuses = content.data.statuses; | |
$.each(statuses, function(i,item){ | |
$(item.text).appenTo('#sina'); | |
}); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment