我正在学习 javascript,我正在尝试找到获取数据的有用方法,这些数据已经显示在页面上(假设它包含在 div 或 span 中),那么什么是收集数据并存储在 JavaScript 中的最佳方法是什么?
有什么好的阅读 Material 可以帮助入门 javascript 吗?
最佳答案
您可以阅读有关文档对象的信息 here ,
Each web page loaded in the browser has its own document object. The Document interface serves as an entry point into the web page's content (the DOM tree, including elements such as and ) and provides functionality which is global to the document (such as obtaining the page's URL and creating new elements in the document)
并了解其方法,例如“getElementById”、here .
关于Javascript 从 div 或 span 中选择数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27192489/