您的位置:首页 > Web前端 > JavaScript

理解javascript之 对象

2013-10-01 22:25 288 查看
大纲:

1、介绍attribute property的异同,翻译自http://javascript.info/tutorial/attributes-and-custom-properties#properties

2、介绍两种property,即数据property和访问器property,以及每种property对应的四种attribute,即[[configrable]],[[enumerable]],[[writable]],[[value]]和[[configurable]],[[enumerable]],[[get]],[[set]]

3、定义property的方法,即Object.defineProperty()和Object.defineProperties(),以及使用字面量定义和defineProperty()定义导致attribute的默认值的异同。由于无法直接获取到四种attribute的值,因此介绍可获取到attribute的方法,即Object.getOwnPropertyDescription(object,property),但支持这一方法的浏览器为IE9+,Firefox4+,safari5+,opera12+,Chrome
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: