Latest web development tutorials

jQuery.browser property

jQuery Misc Methods jQuery Misc Methods

Examples

Display browser information:

$ (Function () {
$ .each ($ .browser, Function (i, val) {
$ ( "<Div>" + i + ": <span>" + val + "</ span>")
.appendTo (document.body);
});
})

try it"

Definition and Usage

$ .browser property has been removed in jQuery 1.9. It returns the user is currently using the browser-related information.

Not recommended to use this property to detect the browser because it is used to determine the browser information based navigator.userAgent property, so it's not necessarily accurate identification.

grammar

$.browser

参数 描述
webkit Boolean类型 指示是否是webkit内核的浏览器。
safari Boolean类型 指示是否是Apple Safari浏览器。
opera Boolean类型 指示是否是opera浏览器。
msie Boolean类型 指示是否是微软IE浏览器。
mozilla Boolean类型 指示是否是Mozilla FireFox浏览器。
chrome Boolean类型 指示是否是Google Chrome浏览器。
version String类型 当前浏览器的版本号,例如:"6.0"、"7.0"。

Examples

More examples

Use IE browser
Indicates currently used browser is IE.

Use WebKit browser kernel
Indicates that the current use of WebKit browser kernel.

Browser version number
Returns current browser version number.

IE browser version
Back IE browser's version number.


jQuery Misc Methods jQuery Misc Methods