简体   繁体   English

我可以在其内部显示HTA的IE兼容版本吗?

[英]Can I display the IE compatibility version of a HTA inside itself?

So I've got this code that runs inside a HTA... 所以我有在HTA内运行的这段代码...

jsv=ScriptEngine()+' v'
    +ScriptEngineMajorVersion()+'.'
    +ScriptEngineMinorVersion()+'.'
    +ScriptEngineBuildVersion()

It displays the version of JScript the HTA is using. 它显示HTA使用的JScript版本。

So... My question is: 所以...我的问题是:

Can I display the IE Compatibility Mode version, or similar, of the HTA in the same way? 是否可以以相同方式显示HTA的IE兼容模式版本或类似版本?

And if so... How?! 如果是这样的话...如何?

In IE8 and later, you can retrieve document.documentMode . 在IE8和更高版本中,您可以检索document.documentMode It gives you a number representing the current document mode, 5 for quirks-mode, 6 for IE6 etc. 它为您提供了一个数字,代表当前的文档模式,“ 5代表“怪癖”模式,“ 6代表IE6等。

In IE6-7 there was document.combatMode , which returned a string telling you whether the standards-compliant mode is switched on or not. 在IE6-7中,有document.combatMode ,它返回一个字符串,告诉您是否打开了符合标准的模式。

Notice, that ScriptEngine returns the latest available JScript version, the used document mode doesn't change the values. 注意, ScriptEngine返回最新的可用JScript版本,使用的文档模式不会更改值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 HTA 和 Javascript 兼容性。 Javascript 在 HTA 中不起作用 - HTA and Javascript Compatibility. Javascript not working in HTA 我可以使用JavaScript或HTML打开IE 10兼容性视图吗? - Can I turn on IE 10 Compatibility View using JavaScript or HTML? JavaScript:如果 IE9 处于 IE7 或 IE8 兼容模式,我可以检测到它吗? - JavaScript: Can I detect IE9 if it's in IE7 or IE8 compatibility mode? 如何在运行IE 9的HTA中使Angular工作? - How do I get Angular working in an HTA running IE 9? 我可以在单个HTA中混合使用VBScript和JScript吗? - Can I Mix VBScript and JScript in a Single HTA? HTA中的JavaScript版本 - JavaScript version in HTA 由于ie8兼容模式的特殊css,如何使用JavaScript为媒体打印编写css? - How can I write css for media print using JavaScript, due to special css for ie8 compatibility mode? 如何检测到在IE11兼容模式下启用了Skype for Business点击通话? - How can I detect that Skype For Business Click to Call is enabled in IE11 compatibility mode? 如何在JavaScript中从内部调用匿名函数? - How can I call an anonymous function from inside itself in JavaScript? 如何在Javascript的属性本身中获取属性名称? - How can I get a property name inside the property itself in Javascript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM