Detect Internet Explorer 6 or below in jQuery

前端 未结 13 2487
野的像风
野的像风 2020-12-12 17:44

I\'m new to jquery and was wondering: is a simple way to detect whether a browser is Internet Explorer 6 or below?

13条回答
  •  猫巷女王i
    2020-12-12 18:39

    jQuery checks for features, rather than "browsers". That said, you can use the jQuery.support method to detect what the users browser is capable of.

    Deprecated Methods (Do not use)

    • $.browser
    • $.browser.version
    • $.boxModel

    https://api.jquery.com/jQuery.support will give you a summary of which features are supported by which browsers. Taking that data, you'll develop a couple conditional checks to determine if the browser being used is your target browser or not.

提交回复
热议问题