luowen
<html>
<head>
<title>Json数据格式强大</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript">
 var pepole={
        "pragrammers":[
    {"name":"效果","age":"6"},
    {"firstname":"小狗","age":"79"}],
        "write":[
    {"name":"路沃恩","time":"2012-04-10"},
    {"love":"cat","time":"2012-09-43"}
        ],
    "pig":"飞天神猪"
        
 
 }
 window.alert(pepole.pragrammers[1].firstname);//拿到小狗的值
 window.alert(pepole.pig);//拿到飞天神猪
 alert(pepole.write[1].love);//拿到cat
</script>
</head>
<body>
</body>
</html>

 

分类:

技术点:

相关文章:

  • 2021-11-20
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-12-21
  • 2021-11-25
猜你喜欢
  • 2021-12-28
  • 2021-06-14
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案