qingruozhu

1、json中输出各个键值:

1 var ohp = {"星期一":18,"星期二":16,"星期三":19,"星期四":11,"星期五":99,"星期六":0,"星期日":0};
2     for(var key in ohp){
3         console.log(key);
4         console.log(ohp[key]);
5     }

2、查询星期五的值: 1 console.log(ohp["星期五"]); //星期五的值 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2021-11-27
  • 2022-03-08
  • 2022-01-26
  • 2021-12-19
  • 2021-12-09
  • 2022-12-23
相关资源
相似解决方案