...

View Full Version : getting information of user's operating system



joonstar
12-17-2006, 01:58 PM
I like to get the information about user's operating system.


Can I know whether the user's O/S is Window, Linux or something in javascript?

bostjank
12-17-2006, 04:01 PM
try this

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

document.write('Your OS: '+OSName);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum