简体   繁体   English

在具有IE = EDGE内容(Javascript,setRequestHeader)的HTA应用程序中,User-Agent不变

[英]User-Agent doesn't change in HTA application with IE=EDGE content (Javascript, setRequestHeader)

When adding <meta http-equiv="X-UA-Compatible" content="IE=EDGE" /> into HTA application, http.setRequestHeader("User-Agent", "Mozilla/5.0.."); <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />到HTA应用程序时, http.setRequestHeader("User-Agent", "Mozilla/5.0.."); does not work. 不起作用。

No problem when setting it as content="IE=9" and below. 将其设置为content="IE=9"及以下版本时没问题。 Any ideas? 有任何想法吗?

使用http = new window.ActiveXObject("Microsoft.XMLHTTP")代替http = new XMLHttpRequest()可解决此问题!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM