我在我的应用程序中使用 document.createEvent()
在javaScript中创建事件 . 我的机器上有IE11 . 我已在本地测试了应用程序,代码工作正常,然后我已将代码更改部署到DEV环境并在同一浏览器上测试相同,并且它也在那里工作 . 但是,当我在QC环境中部署我的应用程序时,我发现它在浏览器控制台中抛出异常 . 因此,在QC环境中,这种变化无效 .
我已经改为 window.event
然后它正在处理所有环境 .
我们有基于struts的应用程序,部署在WebSphere app服务器上 .
有谁知道为什么会出现这个问题?应用服务器上有任何配置可能会导致此问题吗?
谢谢,
杰伊帕特尔
1 回答
这只是一个客户端行为,与WebSphere或Struts无关 .
这听起来就像's caused by IE choosing different 1128434 settings for the different server environments you'重新连接 . 我们是've hit this ourselves because one of our environments is in our company'的域名,而我们的其他环境则在我们客户的域中 . 例如
dev.mycompany.com
与test.customer.com
.IE使用许多条件来确定是否在"Compatibility Mode" vs "Standards Mode"中进行渲染,包括针对特定域进行检查的Compatibility view list,以及网站是否在您的"Trusted Sites"组中 .
所以我列出了(上面的链接),可能会在本地IE设置中添加或删除相应的域(例如Fix site display issues with Compatibility view中所述),或者可能能够在HTML中添加 Headers ,明确告诉IE使用某种模式 .
You can also check which Zone the site belongs to via the IE File > Properties menu .
另一个相关的问答:https://stackoverflow.com/a/13287226