要清楚地理解JavaScript,DOM和BOM之间的关系,我们需要了解JavaScript是怎样实现的。
实际上,完整的JavaScript实现由3个不同的部分组成:
- 核心(基于ECMAScript规范)
- 文档对象模型(DOM)
- 浏览器对象模型(BOM)
ECMAScript
ECMA-262这样描述ECMAScript(European Computer Manufacturing Association,欧洲计算机制造协会):
“ECMAScript can provide core scripting capabilities for a variety of host environments, and therefore the core scripting language is specified…apart from any ...