Home > Web Front-end > JS Tutorial > JavaScript learning basic notes: DOM object manipulation_javascript skills

JavaScript learning basic notes: DOM object manipulation_javascript skills

WBOY
Release: 2016-05-16 17:59:52
Original
1071 people have browsed it

The DOM document object model is the application programming interface (API) of HTML and XML. DOM plans the entire page into a document composed of a node hierarchy. The DOM object gives developers access to HTML and enables them to process and view HTML as an XML document. The DOM object is a language-independent API, which means that its implementation is not bound to JavaScript, which may be misunderstood by beginners. DOM is a tree-based API for XML that focuses not just on parsing XML code, but on representing that code as a series of interrelated objects that can be modified and accessed directly without reparsing the code. they. Due to the ease of use of DOM, it has become the favorite method of web browsers and javascript. The document object is an object of the BOM, that is, window.document==document, but it also belongs to the DOM and is also a manifestation of the HTMLDocument object of the HTML DOM. In turn, it is also an XML DOM Document object.

Most of the DOM processing in JavaScript uses the document object.

To access html elements, you can use the documentElement attribute of document:

var oHtml=document.documentElement;

oHtml object contains an HTMLElement object representing

, through :

var oHead=oHtml.firstChild;

var oBody=oHtml.lastChild;

can get the objects representing
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template