Detect Lion (OS X 10.7) in javascript?

限于喜欢 提交于 2019-12-05 05:40:32

The user agent of Safari (and also Firefox) in Lion is something like

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3

There is "Mac OS X 10_7_1" in it - this indicates Lion (= Mac OS 10.7).

See here: http://www.whatsmyuseragent.com/

You can read the user agent string using "navigator.userAgent"

http://www.quirksmode.org/js/detect.html BrowserDetect.OS I don't know its compatibility though. <- This link does use the useragent.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!