In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly talks about "what are the methods of document objects in javascript language". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the methods of document objects in the javascript language?"
Methods for js document objects: addEventListener (), adoptNode (node), close (), createAttribute (), open (), write (), writeln (), renameNode (), and so on.
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
Document object
Every HTML document loaded into the browser becomes a Document object.
The Document object gives us access to all the elements in the HTML page from the script.
Tip: the Document object is part of the Window object and can be accessed through the window.document property.
Methods of Document object
The method describes addEventListener () to add a handle to the document adoptNode (node) to return the adapded node from another document to the current document. Close () closes the output stream opened with the document.open () method and displays the selected data. CreateAttribute () creates an attribute node createDocumentFragment () creates an empty DocumentFragment object and returns it. CreateElement () creates the element node. CreateTextNode () creates a text node. GetElementsByClassName () returns a collection of all the elements in the document with the specified class name as NodeList objects. GetElementById () returns a reference to the first object that owns the specified id. GetElementsByName () returns a collection of objects with the specified name. GetElementsByTagName () returns a collection of objects with the specified tag signature. ImportNode () copies a node from another document to that document for application. Normalize () deletes empty text nodes and connects neighboring nodes normalizeDocument () deletes empty text nodes, and open () that connects neighboring nodes opens a stream to collect output from any [xss_clean] () or [xss_clean] ln () methods. QuerySelector () returns the first element in the document that matches the specified CSS selector querySelectorAll () document.querySelectorAll () is a new method introduced in HTML5 that returns a list of all element nodes of the matching CSS selector in the document removeEventListener () removes the event handle (added by the addEventListener () method) renameNode () renames the element or attribute node. Write () writes HTML expressions or JavaScript code to the document. Writeln () is equivalent to the write () method, except that a newline character is written after each expression. At this point, I believe you have a deeper understanding of "what are the methods of document objects in the javascript language?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.