Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 471

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 480

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 487

Warning: Attempt to read property "description" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 489

Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 493

9-17 唐兆文

自定义继承

Object.creat()创建新子对象,继承父对象,扩展子对象自有属性

var chlid=Object.create(father,{

​ 属性:{

​ value:"属性值",

​ writable:false,

​ enumerable:true,

​ configgurable:trrye,

}

})

JSON

基本格式:“名:值”

json本身就是一个字符串,所以在外层加单引号

解析json字符串得到javascript对象 JSON.parse(string/json)

将javascript对象转换为jsonz字符串

对象保护

防篡改:

1防扩展:object.preventExtension(obj) 永远不能添加型属性不防删除

2密封:object.seal(obj)

3冻结对象:object.freeze(obj) 修改所有的为flalse

心得

今天的保护对象保镖有点绕。要记忆的单词有点多很多方法都要记忆

评论留言