Bộ điều hướng cửa sổ
Đối tượng Điều hướng Cửa sổ
Đối tượng điều hướng chứa thông tin về trình duyệt.
Đối tượng vị trí là một thuộc tính của đối tượng cửa sổ .
Đối tượng điều hướng được truy cập bằng:
window.navigator
hoặc chỉ navigator
:
Các ví dụ
let url = window.navigator.language;
let url = navigator.language;
Thuộc tính đối tượng điều hướng
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 |
Phương pháp đối tượng điều hướng
Method | Description |
---|---|
javaEnabled() | Returns true if the browser has Java enabled |
taintEnabled() | Removed in JavaScript version 1.2 (1999). |