How to detect OS by javascript ?
var oprating_system ;
oprating_system=' ';
if (navigator.appVersion.indexOf("X11")!=-1) oprating_system="UNIX";
if (navigator.appVersion.indexOf("Win")!=-1) oprating_system="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) oprating_system="MacOS";
if (navigator.appVersion.indexOf("Linux")!=-1) oprating_system="Linux";
No comments:
Post a Comment