从jQuery中排除IE7?

从jQuery中排除IE7?,jquery,internet-explorer-7,Jquery,Internet Explorer 7,我似乎对一些jQuery有问题,我不知道哪里出了问题,所以我只想通过排除ie7来排除它,这可以用jQuery完成吗?你可以试试:)我不知道jQuery,但是如果你需要在脚本中进行检测,你可以使用它来阻止代码运行(条件注释是HTML注释),您可以通过检查某些属性来检测它 var ie7 = (document.all && !window.opera && window.XMLHttpRequest && typeof window.external

我似乎对一些jQuery有问题,我不知道哪里出了问题,所以我只想通过排除ie7来排除它,这可以用jQuery完成吗?

你可以试试:)

我不知道jQuery,但是如果你需要在脚本中进行检测,你可以使用它来阻止代码运行(条件注释是HTML注释),您可以通过检查某些属性来检测它

var ie7 = (document.all && !window.opera && window.XMLHttpRequest && typeof window.external.AddToFavoritesBar=='undefined') ? true : false;
var ie7mode = (document.all && !window.opera && window.XMLHttpRequest && !document.querySelectorAll) ? true : false;
在脚本中,您可以这样使用它:

if(!ie7mode)
{
  //this will be ignored in IE7 or higher versions running in IE7-mode
}  
if(!ie7)
{
  //this will be ignored in IE7 only
}  
如果IE7是个问题,我会感到惊讶,jQuery是为所有浏览器设计的