Difference between quirks mode and standards mode JavaScript

[亡魂溺海] 提交于 2019-12-06 13:33:50
wiky
  1. IE9 standards document mode supports ECMAScript, Fifth Edition features, so the method such as forEach, every, map of Array and defineProperty, keys of Object are support well. more about

  2. IE9 standards document mode supports enhanced DOM programmability. (may not what you're interested in, but it does so). more about

  3. IE9 removes some of the key differences between IE8 JavaScript implementation and the ECMAScript, Third Edition Specification.

  4. Quirks mode supports the JavaScript functionality of IE6, It is similar to the behavior of IE5 and the Quirks mode behavior of IE6, IE7 and IE8.

  5. Something changed in IE9 Standards Mode, such as does not support arguments.caller anymore, JavaScript Property Enumeration Differs, and so on. read Features Changed in Windows Internet Explorer 9 all about this.

yes, there are some differences.

for example, in quirks mode, document.body (the body-element) is the root element and in standard mode it's the html-element (document.documentElement).

this can have a confusing effect when trying to calculate the viewport dimensions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!