1

So I've got this code that runs inside a HTA...

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

It displays the version of JScript the HTA is using.

So... My question is:

Can I display the IE Compatibility Mode version, or similar, of the HTA in the same way?

And if so... How?!

LostInCyberSpace
  • 413
  • 4
  • 19

1 Answers1

1

In IE8 and later, you can retrieve document.documentMode. It gives you a number representing the current document mode, 5 for quirks-mode, 6 for IE6 etc.

In IE6-7 there was document.combatMode, which returned a string telling you whether the standards-compliant mode is switched on or not.

Notice, that ScriptEngine returns the latest available JScript version, the used document mode doesn't change the values.

Teemu
  • 22,918
  • 7
  • 53
  • 106