Internet Explorer 9对象检测 [英] Internet Explorer 9 Object Detection
本文介绍了Internet Explorer 9对象检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在搜索将识别IE9的对象检测功能检查.你能帮我吗?
I am searching for an object detection capability check which will identify IE9. Can you help me?
推荐答案
Afterwards, you could use it like this:
if (ie == 9) {
// It’s IE9!
// Insert your code here
}
这里的好处是,它不会嗅探UA字符串(它本身是不可靠的),而是使用条件注释,该条件注释在IE中可靠地工作.
The good thing here is that it doesn’t sniff the UA string (which, in itself, is unreliable) — instead, it uses conditional comments, which work reliably in IE.
这可用于检测IE5-9.
This can be used to detect IE5—9.
这篇关于Internet Explorer 9对象检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文