开发者

How to detect Chromium OS using JavaScript?

I use Windows to develop my app and I use navigator.platform to detect the OS type.

I don开发者_C百科't have a Chromium OS so I don't know what the value will be returned by the above script.

Can someone tell me what it returns on Chromium OS?


In the userAgent you will get Chrome and then CrOS

For example: var ua = window.navigator.userAgent; // Then check if the UA is something like: Mozilla/5.0 (X11; CrOS i686 0.12.433) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.77 Safari/534.30

Here is a post I've wrote about it in the past: http://greenido.wordpress.com/2011/06/14/how-to-detect-it-is-a-chromebook/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜