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

Javascript 對(duì)象的解釋

所有的構(gòu)造器都是對(duì)象,而并非所有的對(duì)象都是構(gòu)造器.每個(gè)構(gòu)造器都有一個(gè)用來(lái)實(shí)現(xiàn)原型繼承、共享屬性的Prototype屬性。對(duì)象通過(guò)new 表達(dá)式創(chuàng)建;比如,new String("A String") 創(chuàng)建了一個(gè)String對(duì)象。沒(méi)有通過(guò)new而直接調(diào)用構(gòu)造器將有返回值,返回的類(lèi)型將取決于構(gòu)造器。例如String("A String")產(chǎn)生一個(gè)原始的類(lèi)型的字符串而不是一個(gè)對(duì)象。
ECMAScript支持基于原型的繼承。每個(gè)構(gòu)造器都有一個(gè)與之關(guān)聯(lián)的原型,而且通過(guò)此構(gòu)造器創(chuàng)建的對(duì)象都有一個(gè)與構(gòu)造器原型關(guān)聯(lián)的隱式引用(稱(chēng)為,對(duì)象的原型)。進(jìn)一步說(shuō),一個(gè)原型可能有一個(gè)對(duì)其原型的非空隱式引用……,這被稱(chēng)為,原型鏈。當(dāng)一個(gè)引用指向?qū)ο蟮膶傩裕@個(gè)引用指向原型鏈中的第一個(gè)對(duì)象的以此為名的屬性。換句話(huà)說(shuō),第一次,這個(gè)直接關(guān)聯(lián)的對(duì)象,將為這個(gè)屬性被檢查。如果這個(gè)對(duì)象包含以此為名的屬性,這個(gè)屬性就是引用指向的屬性。如過(guò)這個(gè)對(duì)象不包含以此為名的屬性,那么這個(gè)對(duì)象的原型將會(huì)被繼續(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 對(duì)象的解釋,轉(zhuǎn)載需保留來(lái)源!

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

主站蜘蛛池模板: 無码一区中文字幕少妇熟女H | 无限资源日本2019版 | 伊人久综合 | xxx性欧美在线观看 xxx性欧美在线 | 俄罗斯女人与马Z00Z视频 | 亚洲视频在线看 | 花蝴蝶在线高清视频观看免费播放 | 成人国产在线24小时播放视频 | 国产精品一国产精品免费 | 午夜福利在线观看6080 | 人人碰79免费视频 | 桃花免费高清在线观看 | 国产精品一区二区人妻无码 | 久久精品国产亚洲AV蜜臀 | 一个人免费视频在线观看高清版 | CHINA末成年VIDEO学生 | 美女一级毛片免费不卡视频 | 精品一区二区三区在线成人 | 久久精品国产在热亚洲 | 夫妻性姿势真人做视频 | 国产精品亚洲视频在线观看 | 日本aa大片 | 江苏电台在线收听 | 99在线观看视频免费 | 成人在线不卡视频 | 精品国产在线亚洲欧美 | 最近的2019中文字幕HD | 99久久久久精品国产免费麻豆 | 亚洲中字慕日产2020 | 日本高清天码一区在线播放 | 亚洲国产女人aaa毛片在线 | 狠狠狠色丁香婷婷综合久久 | 亚洲午夜久久久久中文字幕 | 青草精品国产福利在线视频 | 成人天堂婷婷青青视频在线观看 | 东日韩二三区 | 日韩经典欧美一区二区三区 | 亚洲国产成人精品无码区5566 | 影音先锋电影资源av | 免费成人小视频 | 免费乱理伦片在线观看八戒 |