To detect the operating system on the client machine, you can use
- navigator.appVersion
- navigator.userAgent property
The Navigator appVersion property is a read-only property and it returns
a string that represents the version information of the browser.
Example to display the operating system name using navigator.appVersion property:
OS Examples
Find Your Operating System
Output:
Before Click on Button
After Click on Button
Example to display all the properties of the client system using navigator.appVersion property:
OS Examples
Display the OS details
Output:
Before Click on Button
After Click on Button