当前位置:网站首页>DOM introduction

DOM introduction

2022-07-06 01:09:00 Rotten Bobby

One 、 What is? DOM

​ Document object model (Document Object Model, abbreviation DOM), yes W3C Handling of organizational recommendations Extensible markup language (html perhaps xhtml) Standards for Programming interface (API) .

​ W3C A series of DOM Interface , Through these DOM Interface can change the content of a web page 、 Structure and pattern .

Two 、DOM Trees

As shown in the figure
 Insert picture description here
DOM Tree is also called document tree model , Map the document to a tree structure , It is processed by node objects , The result of processing can be added to the current page

1 file : A page is a document stay DOM of use document To express
2 node Everything in the web page There is a node in the document tree ( label ,
attribute , Text , Annotations, etc. ), Yes, it is node To express
3 Tag node : All the tags in the web page It is often called an element node , Also referred to as element Use element To express

It should be noted that DOM Think of all the above as objects

原网站

版权声明
本文为[Rotten Bobby]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140143102123.html