天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

Javascript 對象的解釋

所有的構(gòu)造器都是對象,而并非所有的對象都是構(gòu)造器.每個構(gòu)造器都有一個用來實現(xiàn)原型繼承、共享屬性的Prototype屬性。對象通過new 表達式創(chuàng)建;比如,new String("A String") 創(chuàng)建了一個String對象。沒有通過new而直接調(diào)用構(gòu)造器將有返回值,返回的類型將取決于構(gòu)造器。例如String("A String")產(chǎn)生一個原始的類型的字符串而不是一個對象。
ECMAScript支持基于原型的繼承。每個構(gòu)造器都有一個與之關(guān)聯(lián)的原型,而且通過此構(gòu)造器創(chuàng)建的對象都有一個與構(gòu)造器原型關(guān)聯(lián)的隱式引用(稱為,對象的原型)。進一步說,一個原型可能有一個對其原型的非空隱式引用……,這被稱為,原型鏈。當(dāng)一個引用指向?qū)ο蟮膶傩裕@個引用指向原型鏈中的第一個對象的以此為名的屬性。換句話說,第一次,這個直接關(guān)聯(lián)的對象,將為這個屬性被檢查。如果這個對象包含以此為名的屬性,這個屬性就是引用指向的屬性。如過這個對象不包含以此為名的屬性,那么這個對象的原型將會被繼續(xù)檢查……
原文:
Object
ECMAScript does not contain proper classes such as those in C++, Smalltalk, or Java, but rather,supports constructors which create objects by executing code that allocates storage for the objects and initialises all or part of them by assigning initial values to their properties. All constructors are objects,but not all objects are constructors. Each constructor has a Prototype property that is used to implement prototype-based inheritance and shared properties. Objects are created by using constructors in new expressions; for example, new String("A String") creates a new String object. Invoking a constructor without using new has consequences that depend on the constructor. For example,String("A String") produces a primitive string, not an object.
ECMAScript supports prototype-based inheritance. Every constructor has an associated prototype, and every object created by that constructor has an implicit reference to the prototype (called the object's prototype) associated with its constructor. Furthermore, a prototype may have a non-null implicit reference to its prototype, and so on; this is called the prototype chain. When a reference is made to a property in an object, that reference is to the property of that name in the first object in the prototype chain that contains a property of that name. In other words, first the object mentioned directly is examined for such a property; if that object contains the named property, that is the property to which the reference refers; if that object does not contain the named property, the prototype for that object is examined next; and so on.

JavaScript技術(shù)Javascript 對象的解釋,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 久久天天躁狠狠躁夜夜呲 | 中国大陆一级毛片免费 | 谁有成人网站地址 | 伊人不卡久久大香线蕉综合影院 | 四虎永久在线精品国产免费 | 99re28久久热在线观看 | 青青草国产精品久久 | 亚洲AV无码影院在线播放 | 国产精品俺来也在线观看 | 久久99精品久久久久久园产越南 | 国产GV天堂亚洲国产GV刚刚碰 | av天堂网站avtt2017 | 69丰满少妇AV无码区 | 精品国产原创在线观看视频 | 中文字幕无码他人妻味 | 99久久99久久久精品齐齐鬼色 | 亚洲黄视频在线观看 | 3dbdsm变态videos高清 | 办公室丝袜老师在线观看 | 99久久免费国内精品 | 天天爽夜夜爽8888视频精品 | 亚洲日本欧美天堂在线 | 美女扒开腿让男生桶爽免费APP | 99re8在线视频精品 | 三级中国免费的 | 麻豆第一区MV免费观看网站 | 果冻传媒妈妈要儿子 | 狠狠色狠狠色综合 | 色多多深夜福利免费观看 | 一区二区乱子伦在线播放 | 成年人视频免费在线观看 | 亚洲国产欧美另类 | 亚洲黄色三级视频 | 国产普通话精品久久 | 亚洲国产日韩制服在线观看 | 熟女人妻久久精品AV天堂 | 国产高清免费观看 | 神马老子影院午夜伦 | 亚洲精品无码午夜福利在线观看 | 性高跟鞋xxxxhd | 香蕉AV福利精品导航 |