jQuery.browser属性

jQuery 教程 · 2019-03-29 06:39:47

实例

显示浏览器信息:

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

定义和用法

$.browser 属性在jQuery 1.9已经被移除。用于返回用户当前使用的浏览器的相关信息。

不建议使用该属性来检测浏览器,因为它是根据navigator.userAgent属性来确定浏览器信息的,因此它的识别并不一定准确。

语法

$.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"。

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Thirty-three Miniatures

Thirty-three Miniatures

Jiří Matoušek / American Mathematical Socity / 2010-6-18 / USD 24.60

This volume contains a collection of clever mathematical applications of linear algebra, mainly in combinatorics, geometry, and algorithms. Each chapter covers a single main result with motivation and......一起来看看 《Thirty-three Miniatures》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具