<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 獲取原型對象的方法 >**獲取原型對象的三個方法** >[success] >1、構造函數.prototype >2、實例化對象.__proto__ > 3、Object.getPrototypeOf(實例化對象) Object.getPrototypeOf(per1) > 4.Object.setPrototypeOf(實例化對象,該對象的新原型) ```javascript //構造函數 function Person(name,age,sex) { this.name = name;//屬性都添加在構造函數里面 this.age = age; this.sex = sex; } //方法都加在原型上 Person.prototype.sayHi = function () { console.log("我是原型上面方法"); }; //實例化對象 var per1 = new Person("ZS",18,1); console.log(per1); //獲取原型對象 console.log(Person.prototype); console.log(per1.__proto__); console.log(Object.getPrototypeOf(per1)); //比較一下 console.log(Person.prototype == per1.__proto__); //true console.log(Person.prototype == Object.getPrototypeOf(per1)); //trur console.log(Object.getPrototypeOf(per1) == per1.__proto__); //true // 修改原型 var b = new Object(); var Bar = function() {} Object.setPrototypeOf(b,Bar.__proto__) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看