JS方法大全

來源:互聯網
上載者:User

標籤:logs   tno   屬性   方法   nts   tee   document   not   pre   

方法:document.createElement(tagName) 
說明:建立指定元素 
方法:document.createTextNode(文本) 
說明:建立文本節點 
方法:_dom.appendChild(子項目) 
說明:添加新節點 
方法:_dom.getAttribute(屬性名稱) 
說明:返回元素的屬性 
方法:_dom.setAttribute(屬性名稱,屬性值) 
說明:設定元素屬性 
方法:_dom.inserBefore(新元素,子項目) 
說明:在位元組點前插入元素 
方法:_dom.removeAttribute(屬性名稱) 
說明:刪除屬性 
方法:_dom.removeChild(子項目) 
說明:刪除節點 
方法:_dom.replaceChild(新元素,子項目) 
說明:替換節點 
方法:_dom.hasChildNodes() 
說明:是否有子項目 
用於處理XML文檔的DOM元素屬性 
方法:childNotes 
說明:返回所有子項目的數組 
方法:fristChild 
說明:第一個下級元素 
方法:lastChild 
說明:最後一個下級元素 
方法:nextSibling 
說明:下一個元素 
方法:previousSibling 
說明:上一個元素 
方法:nodeValue 
說明:指定元素的讀寫屬性 
方法:parentNode 
說明:返回元素的父節點 
用於遍曆XML文檔的DOM元素方法 
方法:getElementById(ID名) 
說明:根據ID擷取DOM對象 
方法:getElementsByTagName(TagName) 
說明:根據TagName返回對象數組 
方法:getElementsByName(Name) 
說明:根據Name返回對象數組 
方法:hasChildNodes() 
說明:判斷是否有子項目 
方法:getAttribute(屬性名稱) 
說明:返回元素的屬性

JS方法大全

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.