话说前端35-DOM节点操作

2022-12-21 0 367

话说前端35-DOM节点操作
话说后端35-DOM结点操作方式
01:20源自LearningYard辅仁

撷取浓厚兴趣,散播欢乐,快速增长所见所闻,遗留下幸福!

亲爱的您,这儿是LearningYard新辅仁。

那时小编入我们增添话说后端35-DOM结点操作方式,结语的出访。
Share interests, spread happiness, increase knowledge, and leave a good legacy!
Dear you, this is The LearningYard Academy.
Today Xiaobian brings you Knowledge set | Flexsim simulation of delayed supply chain system , welcome to your visit.
结点的基本概念:页面中的大部份文档都是结点(条码、特性、文档、注解等),在DOM 中,结点采用 node 来表示。依照 W3C HTML DOM 国际标准,HTML 文件格式中的大部份文档都是结点:
整个文件格式是一个文件格式结点
每个 HTML 元素是元素结点
HTML 元素内的文档是文档结点
每个 HTML 特性是特性结点
Concept of node: Everything in a web page is a node (tags, attributes, text, comments, etc.). In DOM, nodes are represented by nodes. According to W3Cs HTML DOM standard, everything in an HTML document is a node:
The whole document is a document node.
Every HTML element is an element node.
Text in HTML elements is a text node.
Every HTML attribute is an attribute node.
注解是注解结点
avaScript 进行出访。大部份 HTML 元素(结点)均可被修改,也可以创建或删除结点。
元素结点nodeType为1
特性结点nodeType为2
文档结点 nodeType 为 3 (文档结点包含文字、空格、换行等)
nodeType:检测结点类型,div.nextSibling.nodeType。
nodeName:检测结点名称,div.nextSibling.nodeName
Comments are comment nodes.
Get nodes: through HTML DOM, all nodes in the tree can be accessed through JavaScript. All HTML elements (nodes) can be modified, and nodes can be created or deleted.
Element nodeType is 1.
Attribute nodeType is 2.
The text node nodeType is 3 (the text node contains words, spaces, line breaks, etc.)
NodeType: detects the node type, div.nextSibling.nodeType
NodeName: detect the node name, div.nextSibling.nodeName
Get node:
话说前端35-DOM节点操作
操作方式结点:
Operation node:
话说前端35-DOM节点操作
那时的撷取就到这儿了。如果您对那时的文章有什么独特的想法,欢迎评论留言,让我们相约明天,祝您那时过得开心欢乐!
Thats it for todays sharing. If you have any unique ideas for todays article, please leave a comment, let us meet tomorrow, I wish you a happy day!

翻译:360翻译

本文由LearningYard新辅仁原创,部分图片文字源自网络,如有侵权请联系。

文字&排版|李仕阳
审核|李焕
举报/反馈

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务