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

Javascript 對象的解釋

所有的構造器都是對象,而并非所有的對象都是構造器.每個構造器都有一個用來實現原型繼承、共享屬性的Prototype屬性。對象通過new 表達式創(chuàng)建;比如,new String("A String") 創(chuàng)建了一個String對象。沒有通過new而直接調用構造器將有返回值,返回的類型將取決于構造器。例如String("A String")產生一個原始的類型的字符串而不是一個對象。
ECMAScript支持基于原型的繼承。每個構造器都有一個與之關聯的原型,而且通過此構造器創(chuàng)建的對象都有一個與構造器原型關聯的隱式引用(稱為,對象的原型)。進一步說,一個原型可能有一個對其原型的非空隱式引用……,這被稱為,原型鏈。當一個引用指向對象的屬性,這個引用指向原型鏈中的第一個對象的以此為名的屬性。換句話說,第一次,這個直接關聯的對象,將為這個屬性被檢查。如果這個對象包含以此為名的屬性,這個屬性就是引用指向的屬性。如過這個對象不包含以此為名的屬性,那么這個對象的原型將會被繼續(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技術Javascript 對象的解釋,轉載需保留來源!

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

主站蜘蛛池模板: 亚洲一区成人 | 色欲国产麻豆一精品一AV一免费 | 欧美亚洲国产手机在线有码 | 国产精品久久久久久亚洲影视 | 精品一区二区三区四区五区六区 | 紧致肉肉高h | 亚洲精品日韩在线观看视频 | 在线高清无码欧美久章草 | 香蕉AV福利精品导航 | 日韩精品AV一区二区三区 | a4you销魂gogo人体 | 国产综合欧美区在线 | 我的好妈妈BD免费观看 | 日韩综合网 | 香蕉 在线播放 | 国产午夜精品福利久久 | 动漫成年美女黄漫网站 | 久久偷拍人 | 手机伊在人线香蕉2 | 日产精品高潮呻吟AV久久 | 超碰99热在线精品视频 | 看了n遍舍不得删的黄文 | 国产亚洲欧美高清在线 | 国产 高清 无码 在线播放 | 欧美大片免费观看 | 99精品亚洲| 国产精品亚洲AV毛片一区二区三区 | 国产人妻XXXX精品HD电影 | 快穿之H啪肉 | 亚洲精品福利一区二区在线观看 | 精品国产福利在线视频 | 久久青青草视频在线观 | 老师那里好大又粗h男男 | 亚洲国产精品特色大片观看 | 韩剧甜性涩爱 | 国产高清视频在线观看不卡v | 国产人A片在线乱码视频 | 亚洲色图在线视频 | 光棍天堂在线a | 精品高清国产a毛片 | 国产成人综合在线观看 |