检测Metro IE和Desktop IE。来自window.createPopup()错误。 [英] Detection of Metro IE and Desktop IE. from window.createPopup() Error.

查看:59
本文介绍了检测Metro IE和Desktop IE。来自window.createPopup()错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果(window.navigator.appName ==" Microsoft Internet Explorer"){b
}  尝试{window.createPopup(); mIe = 1} catch(e){mIe = 0}

}


alert(mIe)



//注意:我仍在使用Windows 8的评估版。


解决方案

if(window.createPopup)


....避免UAS嗅探...改为使用特征检测。 ..


但Metro IE没有推荐的功能检测,因为UAS在两个版本中都是相同的...如果您的页面/站点使用activex或flash添加RequiresActiveX = true x -ua meta to the page ....用户将被提示切换到桌面模式。


w8 RTM可从MSDN订阅下载。



if(window.navigator.appName=="Microsoft Internet Explorer"){
 try{window.createPopup(); mIe=1}catch(e){mIe=0}
}

alert(mIe)

// Note: That I am still using the evaluation copy of Windows 8.

解决方案

if(window.createPopup)

....avoid UAS sniffing... use feature detection instead...

however there is no recommended feature detection for Metro IE as the UAS is the same in both versions... if your page/site uses activex or flash add the RequiresActiveX=true x-ua meta to the page.... the user will be prompted to switch to desktop mode.

w8 RTM is available for download from MSDN subscriptions.


这篇关于检测Metro IE和Desktop IE。来自window.createPopup()错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆