在jQuery中检测Internet Explorer 6或更低版本 [英] Detect Internet Explorer 6 or below in jQuery
本文介绍了在jQuery中检测Internet Explorer 6或更低版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是jquery的新手,我想知道:这是检测浏览器是否为Internet Explorer 6或更低版本的简单方法吗?
I'm new to jquery and was wondering: is a simple way to detect whether a browser is Internet Explorer 6 or below?
推荐答案
就这么简单:
if($.browser.msie && $.browser.version=="6.0") alert("Im the annoying IE6");
更新
请注意, $ .browser 是如果您仍需要在jQuery 1.9(或其他不建议使用的功能)中使用$ .browser,请尝试jQuery-migrate( http://code.jquery.com/jquery-migrate-1.2.1.js )
If you still need to use $.browser in jQuery 1.9 (or other deprecated functions), try jQuery-migrate (https://github.com/jquery/jquery-migrate/ - http://code.jquery.com/jquery-migrate-1.2.1.js)
这篇关于在jQuery中检测Internet Explorer 6或更低版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文