There have been several revisions of Javascript/ECMAScript/JScript, and different versions have been deployed in different situations. This table details which versions relate to which browser.
| Javascript | Mozilla | JScript | IE | ECMA |
|---|---|---|---|---|
| JavaScript 1.0 | Netscape 2 | JScript 1.0 | Early IE 3 | |
| JavaScript 1.1 | Netscape 3 | JScript 2.0 | Late IE 3 | ECMAScript 1 plus switch |
| JavaScript 1.2 | Netscape 4 | - | - | |
| JavaScript 1.3 | Netscape 4.5 | JScript 3.0 | IE 4 | |
| JavaScript 1.4 | Server only | - | - | |
| JavaScript 1.5 | Mozilla/Netscape 6 | JScript 5 | IE 5 | ECMAScript 3 |
博客介绍了Javascript/ECMAScript/JScript有多个版本,不同版本应用于不同场景,还给出了各版本与浏览器对应关系的表格。重点指出IE虽支持JavaScript 1.5,但在script标签的“language”属性中不支持,若设置大于“javascript1.2”的值,脚本可能无法执行。
2245

被折叠的 条评论
为什么被折叠?




warning on IE's "support" of JavaScript 1.5
IE does support JavaScript 1.5, but it doesn't support it in the "language" attribute of the script tag.
If you include the language attribute (which was originally meant to allow a page to gracefully degrade in older browsers, a concept that's increasingly obsolete), you can't have a value greater than "javascript1.2". Anything besides "javascript" or "javascript1.2" and IE will likely not execute the script.