How to determine the type of browser, operating system where the current

Currently there are three major operating systems: Windows / MacOS / Linux JavaScript want to use their judgment in the operating system by:. Navigator.platform achieved;

navigator.platform; // "Win32"

There are three general the following return values: 

1. Windows: "Win32"

2. MacOS: "MacIntel"

3. Linux: "Linux x86_64"

 

Note: You can not pass this way to get mobile devices such as mobile phone operating system

Guess you like

Origin www.cnblogs.com/aisowe/p/11719404.html