Thursday, 22 October 2015

How to detect OS by javascript ?


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

Interactive CSS Button Designer Tool – Free & Fast

What is Button ?                               Button is an element of HTML. HTML is used to design Web Pages, Websites and Web applications...