HTA and 'x-ua-compatible' meta tag

后端 未结 5 478
挽巷
挽巷 2020-12-06 08:30

Added to post Jun-19-2014

Thanks Bond. Since you had IE9, I appreciate your test. Hopefully if somebody out there has IE 10 they will test it, too. It does not mak

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 09:02

    I can confirm, (for some extremely odd reason); both CED and TRSyntax are on to something!
    - Thanks by the way guys! - I'd have never 'guessed' this (and I thought I knew VBS quite well...)

    Just as a quick bit of background information: I was simply trying to make my HTA prettier - it was already fully functional (this includes the fact I had my onload written literally as Window.OnLoad() and I added border-radius to my CSS and found it didn't work. - Bit of research suggested that I needed to add extra 'compatibility' via the Meta declaration of

    Immediately after doing this my entire HTA's VBS broke - I tried different 'Content Modes' and discovered content="IE=8" allowed the VBS to work again but 'back to square one' in that it was ignoring the CSS for border-radius.

    This is when I finally arrived here - it would seem that adding the meta makes interpretation of the VBS stricter which is perhaps why my OnLoad function was now invalid... (although a strange note is the fact my original Window.OnLoad() is invalid but window.OnLoad() is valid...) Merely changing the W on "Window" and keeping the same O for "On" fixed the problem, I presumed the "OnLoad" would also need changing to "onLoad" but this isn't the case...

    So to summarise (to stop me waffling on too much) I will share my working settings:

    Top of the document:
    I put this in for 'good practice' when making HTML5 based web pages, although it's not actually needed here with the meta declaration.

    Within the :
    For some strange reason I get best overall results with IE=9 or IE=10. Any of the others seem to cause problems such as IE=8 breaks the CSS, IE=11 or IE=Edge seems to break the VBS

    Within the

提交回复
热议问题