class and id in html
前面一直弄不太清楚 html 标签属性的 class 与 id 究竟有什么区别,查了下发现:
- class可以添加至多个标签中;(标签可以不唯一)
- id 仅能添加至一个标签中;(标签带有唯一性)
具体见这个HTML: The Difference Between id and class
BOM and DOM in javascript
那 javascript 中的 BOM 与 DOM 又有什么具体区别呢?
The BOM (Browser Object Model) consists of the objects navigator,
history, screen, location and document which are children of window.
In the document node is the DOM (Document Object Model), the document
object model, which represents the contents of the page. You can manipulate
it using javascript.
参考
更多有意思的内容可参考本人博客:老香椿(https://laoxiangchun.cn/)