<script type="text/javascript">
var loadInfo = function(videoId) {
var gdata = document.createElement("script");
gdata.src = "http://gdata.youtube.com/feeds/api/videos/" + videoId
+ "?v=2&alt=jsonc&callback=storeInfo";
var body = document.getElementsByTagName("body")[0];
body.appendChild(gdata);
};
var storeInfo = function(info) {
console.log(info.data.title);
};
</script>
---------------------
Then you just need to call loadInfo(videoId)
全站熱搜
留言列表