IE9 中的 JScript 版本是什么?
我想要一些 条件编译 代码可以在 IE9 以下的所有 IE 中运行。
I want this for some conditional compilation code that will run in all IE's less than IE9.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
低于 IE9 的检查是:
值得注意的是,维基百科人群很好地保持了这些更新:http:// en.wikipedia.org/wiki/Conditional_comment
The check for less than IE9 is:
It's worth noting, the wikipedia crowd keeps these updated pretty well: http://en.wikipedia.org/wiki/Conditional_comment
进行功能检测几乎总是更好,而不是特定版本(或特定浏览器)检测,因为无法确定浏览器的给定版本始终相同。
例如,微软很快就会发布一个新的移动平台,带有自己的IE版本。过去,移动版 IE 有时会报告与桌面版完全相同的版本数据,但它们之间的功能和怪癖却截然不同。
我还建议使用 jQuery、Modernizr 和其他工具来更轻松地编写代码,而不必担心您使用的是哪个浏览器。
It is almost always better to do feature detection, not specific version (or specific browser) detection, because there's no certainty that a given version of a browser is always the same.
For example, Microsoft will release a new mobile platform soon, with its own version of IE. In the past, the mobile versions of IE have sometimes reported exactly the same version data as the desktop versions, but they've had very different features and quirks between them.
I'd also suggest using jQuery, Modernizr, and other tools to make it easier to write code without having to worry about which browser you're on.
嗯,我也认为特征检测是最安全的选择。
您可能还想关注特定 jscript 版本提供的 ecma 支持。
对于 IE 9 http://msdn.microsoft.com/en-us/ie/ff468705.aspx
以及 John resig 的帖子..
ejohn.org/blog/versions-of-javascript/
Hmmm, i too think that feature detection is the safest bet.
you might also wanna keep an eye on the ecma support that particular jscript versions offer..
For IE 9 http://msdn.microsoft.com/en-us/ie/ff468705.aspx
And John resig's post..
ejohn.org/blog/versions-of-javascript/