---
title: "window.navigator对象"
author: "小丑鱼0703"
date: "2014-04-04T17:28:03Z"
tags: []
categories: ["Web前端"]
slug: "window-navigator"
draft: false
lastmod: "2015-01-30T11:37:31Z"
id: 2041222
url: "https://wangjingyi.iteye.com/blog/2041222"
---

window.navigator 对象包含有关访问者浏览器的信息。 navigator没有统一的标准，因此各个浏览器都有自己不同的navigator版本。 appCodeName -- 浏览器代码名的字符串表示 appName -- 官方浏览器名的字符串表示 appVersion -- 浏览器版本信息的字符串表示 \[color=red]cookieEnabled\[/color] -- 如果启用cookie返回true，否则返回false,可以判断用户浏览器是否开启cookie javaEnabled -- 如果启用java返回true，否则返回false platform -- 浏览器所在计算机平台的字符串表示 plugins -- 安装在浏览器中的插件数组 taintEnabled -- 如果启用了数据污点返回true，否则返回false \[color=red]userAgent\[/color] -- 用户代理头的字符串表示,包含浏览器版本等信息的字符串 \[code="js"]\[/code]