- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
获取节点的方法(Method for obtaining node)
获取节点的方法(Method for obtaining node)
1. get through the top document node method:
(1) document.getElementById (elementId): this method can obtain the needed elements accurately through the ID of the node, and it is a relatively simple and quick method. If the page contains multiple nodes of the same ID, then only the first node is returned.
(2) document.getElementsByName (elementName): this method is to obtain node by node name, can be seen from the name, not a node element this method returns the node array but has the same name. Then, we can loop to determine whether the node is needed by getting an attribute of the node. This returns an array
For example, in HTML, checkbox and radio identify elements within a group by the same name attribute value. If we are going to get the selected element now, we first get the reorganization element and then circle to determine whether the checked property value of the node is true.
(3) document.getElementsByTagName (tagName): this method is to obtain the same node by node Tag, this method returns an array, for example: document.getElementsByTagName (A) will return all the hyperlinks on the page node. Pass the special string * to the getElementsByTagName () method, which returns a list of all the elements in the document, and the order in which elements are arranged is their order in the document.
2. using document attributes to obtain
(1) the elements contained in.Document.all[] remain in the initial order, and if you know exactly where they are in the array, you can extract them directly from the array.
However, it is more common to use all[] arrays to access elements based on their HTML attribute name or ID. If multiple elements have the specified name, an array of elements sharing the same name will be obtained.
Document.all[SSS, ].href=, 127.0.0.1;
Document.all[CCC].innerHTML= I lean on and see if I can use it.;;
Document.all.tags (a) [[0]].innerHTML=, I lean on, look at DDSF SDF, see if you can use it;;
(2) anchors[] retur
您可能关注的文档
- 竞争机制(competition mechanism).doc
- 窗帘的选购与使用(The selection and use of curtain).doc
- 第2章 电子商务项目的可研与立项(The second chapter is the feasibility study and project of e-commerce project).doc
- 第10章微生物的进化`系统发育和分类鉴定(The tenth chapter is the evolution, phylogeny and taxonomic identification of microorganisms).doc
- 第3章、集成运放电路基础(The third chapter is the basis of integrated operational amplifier circuit).doc
- 第3章第二节句子表达的准确性-动词时态句型(The third chapter is the accuracy of second sentence expressions verb tense and sentence pattern).doc
- 第4章 DOM基础及高级DOM(第4章 dom基础及高级dom).doc
- 第4周实验心理学(Fourth weeks experimental psychology).doc
- 第4章 万向传动轴设计(The fourth chapter is the design of universal transmission shaft).doc
- 第2章 自然环境中的物质运动和能量交换(The second chapter is about the material movement and energy exchange in the natural environment).doc
- 菁菁教育广告(Jingjing education advertising).doc
- 菜单的作用(Menu role).doc
- 菊花茶的药效(The efficacy of chrysanthemum tea).doc
- 菜单的建立(Menu creation).doc
- 董事会在企业战略决策中的作用(The role of the board of directors in enterprise strategic decision making).doc
- 蒙古八十八功臣(Eighty-eight heroes of Mongolia).doc
- 蒋经国和他的母亲(Jiang Jingguo and his mother).doc
- 蒙特梭利家庭教育实用方案(Montessori family education practical program).doc
- 蒙特梭瑞教室的英语工作(English work in Monte Sori's classroom).doc
- 蒙田(Montaigne).doc
最近下载
- 2025年甘肃省武威市凉州区发放镇招聘专业化管理大学生村文书笔试备考试题及答案解析.docx VIP
- 中国宫腔镜诊断与手术临床实践指南(2023年).pptx VIP
- 2025年法律职业资格(客观题)真题含答案.docx VIP
- 展板版式设计.ppt VIP
- 2025年全国司法考试客观题试卷及答案.docx VIP
- 职能科室对医技科室医疗质量督查记录表(检验科、放射科、超声科、功能科、内镜室).pdf VIP
- 中国宫腔镜诊断与手术临床实践指南(2023版).pptx VIP
- 血透患者心理健康宣教ppt.pptx
- 【新教材】英语必修第二册(新人教版)教材习题参考答案.pdf VIP
- 手机数据恢复精灵误删信息轻松恢复.PDF VIP
文档评论(0)