<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                屬性不能單獨存在,一定屬于一個標簽。所有,操作屬性,前提必須找到標簽。 # 1、獲取元素的屬性 ![](https://img.kancloud.cn/c1/04/c104246deb7a4e27500bfc1549dc7ab4_1133x219.png) > attributes: > ![](https://img.kancloud.cn/00/e1/00e11b853caf9b5b179ff80314b66234_581x258.png) > getAttribute(); :獲取元素的屬性。只能獲取有具體值的屬性 > 元素.屬性:獲取元素的屬性,能夠獲取類似于readOnly、checked等屬性 ![](https://img.kancloud.cn/92/d6/92d676b8b9186de4863231a56b6110ca_900x444.png) # 2、添加/修改元素的屬性 ![](https://img.kancloud.cn/51/0d/510de119e04a70aef8e8249998b75655_1194x249.png) ![](https://img.kancloud.cn/5a/a1/5aa136465e99b852fbefae64fd9d41fe_1045x317.png) ![](https://img.kancloud.cn/32/1a/321ad6eb59df3a7f6aeee0513af570f0_1052x356.png) 如果要設置checked、readonly、disabled,則需要設置它的值為true或false。 # 3、刪除元素的屬性 元素節點.removeAttribute(屬性名) 刪除一個屬性 ![](https://img.kancloud.cn/3d/42/3d429d5a094fe6d1bc6477273621d6e4_953x266.png) # 4、判斷元素是否有哪個屬性 elementNode.hasAttribute(屬性名) 檢測是否有某個屬性,有返回true,沒有返回false 檢測,看3.3代碼。 # 5、總結 節點分為元素類型的節點和屬性類型的節點,也包括文本類型的節點。 > 元素類型的節點: * 增: document.createElement()、document.createTextNode()、父節點.appendChild()、父節點.insertBefore() * 刪:父節點.removeChild(); * 改:父節點.replaceChild(); * 查:document.getEle….By… document.querySelector() > > 屬性類型的節點: * 增:元素.setAttribute(屬性名, 值); 元素.屬性名 = 值; * 刪:元素.removeAttribute(屬性名); * 改:元素.setAttribute(屬性名, 值); 元素.屬性名 = 值; * 查:元素.attributes; 元素.getAttribute(屬性名); 元素.屬性名;
                  <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>

                              哎呀哎呀视频在线观看