其他分享
首页 > 其他分享> > 5.3 JSON(重点)

5.3 JSON(重点)

作者:互联网



点击查看代码
<script>
        var Student={
            name: '秦疆',
            age: '20',
            run: function () {
                console.log(this.name + "run.....")
            }
        }

        var xiaoming={
            name:'xiaoming'
        };

        xiaoming.__proto__=Student;

        // 字符串转为对象
      var obj =  JSON.parse('{"naem":"秦疆","age":"20","sex":"男"}');
    </script>

标签:xiaoming,5.3,20,name,JSON,秦疆,var,重点
来源: https://www.cnblogs.com/ahhh7931/p/16683895.html