|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
这是我的代码
- var infoid = function(json){
- for (var i=0;i<5;i++){
- alert(json['infos'][i]['categoryname']);
- }
- }
- var s=document.createElement('script');
- s.src='https://xxx.xx.xxx/common?callback=infoid';
- document.body.appendChild(s);
复制代码
这里是jsonp
- infoid({
- "msg": "成功了",
- "code": 0,
- "data": {
- "pagination": {
- "currentPageIndex": 1,
- "pageSize": 10,
- "recordCount": 1
- },
- "infos": [{
- "adddate": "19-11-23",
- "categoryname": "笔记本电脑",
- "categoryurl": "https://baidu.com/",
- }]
- }
- })
复制代码
怎么修改我的代码 单独把adddate、categoryname alert出来? |
|