h5开发初学者
h5开发初学者
  • 发布:2016-06-27 10:20
  • 更新:2016-06-27 13:53
  • 阅读:929

数据解析问题

分类:MUI

为什么我respoonse.weatherinfo没有数据

2016-06-27 10:20 负责人:无 分享
已邀请:
赵梦欢

赵梦欢 - 专注前端,乐于分享!

很明显你这里已经得到数据,respoonse.weatherinfo依然是个对象,这篇文章有讲到:http://zhaomenghuan.github.io/#!/blog/20160529

  • h5开发初学者 (作者)

    respoonse.weatherinfo.city也是出不来的,出这个undefined,但是我在w3school上面,能出来的var JSONObject= {"weatherinfo":{"city":"北京","cityid":"101010100","temp1":"15℃","temp2":"5℃","weather":"多云","img1":"d1.gif","img2":"n1.gif","ptime":"08:00"}};

    document.getElementById("jname").innerHTML=JSONObject.weatherinfo.city,在mui这里不行

    2016-06-27 13:31

h5开发初学者

h5开发初学者 (作者)

weatherinfo去掉双引号就可以了,是不是mui的bug

该问题目前已经被锁定, 无法添加新回复