一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

Javascript 對象的解釋

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

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

主站蜘蛛池模板: 在线第一页 | 欧美性与交视频在线观看 | 午夜91| 精品色综合 | 99xxoo视频在线永久免费观看 | 视色 4se| 狠狠干2023 | 日本免费www| 国产一区二区精品在线观看 | 日本一区二区三区高清在线观看 | 亚洲伊人色欲综合网 | 国产精品视频分类 | 国产日本一区二区三区 | 欧美日韩中文国产一区二区三区 | 成人三级视频在线观看 | 国产亚洲美女精品久久久久狼 | 国产欧美性综合视频性刺激 | 国产精品极品美女免费观看 | 天天插伊人| 日本一区二区在线不卡 | 四虎永久在线观看视频精品 | 国内精品免费麻豆网站91麻豆 | 中文字幕91在线 | 偷偷狠狠的日日2020 | 国产在线观看中文字幕 | 国产精品自在自线免费观看 | 色哟哟精品视频在线观看 | 99视频在线观看视频一区 | 福利在线播放 | 视频成人永久免费看 | 色老板最新网站视频地址 | 好吊色在线| 特大巨黑吊在线播放 | 亚洲天堂一区二区三区四区 | 国产麻豆网站 | 一本色道久久88综合亚洲精品高清 | 五月婷婷俺来也 | chinese国产一区二区 | 99久久国产综合精麻豆 | 天天色天 | 欧美日韩a |