-
UID:159433
-
- 注册时间2015-01-21
- 最后登录2018-09-03
- 在线时间82小时
-
- 发帖10
- 搜Ta的帖子
- 精华0
- 金钱135
- 威望21
- 贡献值0
- 好评度11
-
访问TA的空间加好友用道具
|
- function load(successCallback) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET","http://api.acfun.tv/apiserver/recommend/list");
- xhr.onreadystatechange = function()
- {
- if ( xhr.readyState == xhr.DONE)
- {
- if ( xhr.status == 200)
- {
- var res = JSON.parse(xhr.responseText)
- successCallback(res)
- }
- }
- }
- xhr.send();
- }
我想把上面l链接返回的title和cover作为标题和封面在网格视图里显示,可是这个 successCallback(res)函数该怎么写呢?链接返回 - {"success":true,"msg":"ok","status":200,"data":{"list":[{"slideId":17954,"title":"第57届格莱美颁奖典礼","subtitle":"高清中字","description":"","cover":"http://static.acfun.mm111.net/dotnet/artemis/u/cms/www/201502/121746280ajo.jpg","releaseDate":1423794178000,"specialId":"1740084","config":6,"url":null,"type":0,"weekday":null,"time":null},{"slideId":17936,"title":"2015羊年美国春晚","subtitle":"大案力作","description":"","cover":"http://static.acfun.mm111.net/dotnet/artemis/u/cms/www/201502/11180422peru.png","releaseDate":1423649307000,"specialId":"1737223","config":6,"url":null,"type":0,"weekday":null,"time":null},{"slideId":17908,"title":"碉堡傻缺视频合辑","subtitle":"2015年2月第1周","description":"","cover":"http://static.acfun.mm111.net/dotnet/artemis/u/cms/www/201502/09111413oh30.png","releaseDate":1423450327000,"specialId":"1729837","config":6,"url":null,"type":0,"weekday":null,"time":null},{"slideId":17909,"title":"宇宙中的上帝","subtitle":"历史频道:宇宙","description":"","cover":"http://static.acfun.mm111.net/dotnet/artemis/u/cms/www/201502/09112510zojb.png","releaseDate":1423450327000,"specialId":"1729946","config":6,"url":null,"type":0,"weekday":null,"time":null}]}}
|