目录

window navigator


窗口导航器对象

这个导航器对象包含有关浏览器的信息。

这个导航器对象是的属性窗口对象

这个导航器对象通过以下方式访问:

window.navigator要不就navigator:

示例

let url = window.navigator.language;
亲自试一试 »
let url = navigator.language;
亲自试一试 »

导航器对象属性

Property Description
appCodeName Returns browser code name
appName Returns browser name
appVersion Returns browser version
cookieEnabled Returns true if browser cookies are enabled
geolocation Returns a geolocation object for the user's location
language Returns browser language
onLine Returns true if the browser is online
platform Returns browser platform
product Returns browser engine name
userAgent Returns browser user-agent header

导航器对象方法

Method Description
javaEnabled() Returns true if the browser has Java enabled
taintEnabled() Removed in JavaScript version 1.2 (1999).