http://blog.163.com/yangjun1988422@126/blog/static/47412917201152294534234/
function detectOS()
{
//alert( navigator.userAgent.toLowerCase() );
//return;
isWindows = (navigator.userAgent.toLowerCase().indexOf("windows",0) != -1)?1:0;
isMac = (navigator.userAgent.toLowerCase().indexOf("mac",0) != -1)?1:0;
isLinux = (navigator.userAgent.toLowerCase().indexOf("linux",0) != -1)?1:0;
isUnix = (navigator.userAgent.toLowerCase().indexOf("x11",0) != -1)?1:0;
if (isWindows)
return "MS Windows";
if (isMac)
return "Apple Mac";
if (isLinux)
return "Lunix";
else if (isUnix)
return "Unix";
return "Unknown";
}