Perhaps you could try:
var os = navigator.platform;
Then process the os variable accordingly for your result.
You can also scroll through each object of the navigator object to help you become more familiar with the objects:
<script type="text/javascript"> for(var i in navigator){ document.write(i+"="+navigator[i]+'<br>'); } </script>
As found in this address: jQuery / Javascript to detect an OS without a plugin?
marcelo-ferraz Dec 10 '12 at 19:35 2012-12-10 19:35
source share