[英]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版本。
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.