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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [https://www.runoob.com/jsref/dom-obj-attributes.html](https://www.runoob.com/jsref/dom-obj-attributes.html) **創建屬性節點** ``` document.createAttribute() //創建一個屬性節點 ``` 獲取屬性節點 ``` element.attributes; //返回一個元素的屬性數組 //返回指定屬性節 document.getElementById("xxoo").attributes[0];//element.attributes[0] element.getAttributeNode();//返回指定屬性節 document.getElementsByTagName("a")[0].getAttributeNode("target"); element.getAttribute element.title;//設置或返回元素的title屬性 element.className;//設置或返回元素的class屬性 ``` **重命名屬性** ``` document.renameNode()//重命名元素或者屬性節點。 ``` **修改屬性** ``` element.setAttribute("eg:type","eg:button");//設置或者改變指定屬性并指定值。 element.setAttributeNode("eg:class、name、id、value");//設置或者改變指定屬性節點。 ``` **所有主流瀏覽器都支持 Attr 對象和 NamedNodeMap 對象。** | 屬性 / 方法 | 描述 | | :-- | :-- | | [*attr*.isId](https://www.runoob.com/jsref/prop-attr-isid.html) | 如果屬性是 ID 類型,則 isId 屬性返回 true,否則返回 false。 | | [*attr*.name](https://www.runoob.com/jsref/prop-attr-name.html) | 返回屬性名稱 | | [*attr*.value](https://www.runoob.com/jsref/prop-attr-value.html) | 設置或者返回屬性值 | | [*attr*.specified](https://www.runoob.com/jsref/prop-attr-specified.html) | 如果屬性被指定返回 true ,否則返回 false | | [*nodemap*.getNamedItem()](https://www.runoob.com/jsref/met-namednodemap-getnameditem.html) | 從節點列表中返回的指定屬性節點。 | | [*nodemap*.item()](https://www.runoob.com/jsref/met-namednodemap-item.html) | 返回節點列表中處于指定索引號的節點。 | | [*nodemap*.length](https://www.runoob.com/jsref/prop-namednodemap-length.html) | 返回節點列表的節點數目。 | | [*nodemap*.removeNamedItem()](https://www.runoob.com/jsref/met-namednodemap-removenameditem.html) | 刪除指定屬性節點 | | [*nodemap*.setNamedItem()](https://www.runoob.com/jsref/met-namednodemap-setnameditem.html) | 設置指定屬性節點(通過名稱) |
                  <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>

                              哎呀哎呀视频在线观看