[英]Where can I find a reference list of DOM methods(?) such as appendChild()?
I'm looking for a list of things such as appendChild() or createElement() but I assumed they were called event methods but when I search for such a thing, I don't really find what I'm looking for. 我正在寻找诸如appendChild()或createElement()之类的东西的列表,但我假设它们被称为事件方法,但是当我搜索此类东西时,我并没有真正找到想要的东西。 I've tried searching JS events, event handlers, DOM, DOM events, Dom handlers, Dom methods etc...... 我试过搜索JS事件,事件处理程序,DOM,DOM事件,Dom处理程序,Dom方法等。
What are they called and how do I find a list of them? 他们叫什么名字,我怎么找到他们的名单?
DOM APIs are what you need. 您需要DOM API。 querySelectorAll
, addEventListener
, removeChild
- these are all different DOM methods. querySelectorAll
, addEventListener
, removeChild
这些都是不同的DOM方法。
The MDN document is one of the best places for information on the DOM, and many other aspects of front-end development. MDN文档是有关DOM以及前端开发的许多其他方面的最佳信息之一。 Start here 从这里开始
This MDN guide on event handling is also excellent 该MDN事件处理指南也非常出色
Mainly, you have the EventTarget interface , that provides the method addEventListener()
and let you to attach unlimited events . 主要是,您具有EventTarget接口 ,该接口提供方法addEventListener()
并允许您附加无限个事件 。
Additionally, the Web API DOM provides other interfaces like Document for DOM manipulation (eg element selection like querySelector
). 另外, Web API DOM提供了其他接口(如Document)进行DOM操作(例如,元素选择(如querySelector
))。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.