Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Navigator
  4. oscpu

Navigator: oscpu property

TheNavigator.oscpu property returns a string that identifies the current operating system.

Value

A string providing a string which identifies the operating system on which the browser is running.

Operating systemoscpuInfo string format
OS/2OS/2 Warp x (either 3, 4 or 4.5)
Windows CEWindowsCE x.y
Windows 64-bit (64-bit build)Windows NT x.y; Win64; x64
Windows 64-bit (32-bit build)Windows NT x.y; WOW64
Windows 32-bitWindows NT x.y
Mac OS X (PPC build)PowerPC Mac OS X version x.y
Mac OS X (i386/x64 build)Intel Mac OS X ormacOS version x.y
Linux 64-bit (32-bit build)Output ofuname -s followed byi686 on x86_64
LinuxOutput ofuname -sm

In this tablex.y refers to the version of the operating system

Examples

js
function osInfo() {  alert(navigator.oscpu);}osInfo(); // alerts "Windows NT 6.0" for example

Usage notes

Unless your code is privileged (chrome or at least has the UniversalBrowserRead privilege), it may get the value of thegeneral.oscpu.override preference instead of the true platform.

Specifications

Specification
HTML
# dom-navigator-oscpu

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp