gpt4 book ai didi

javascript - 有没有办法用javascript检测win服务包?

转载 作者:行者123 更新时间:2023-11-29 22:32:40 26 4
gpt4 key购买 nike

我知道可以使用带有 javascript 的导航器对象检索操作系统名称,但是服务包版本呢?

有没有办法用纯js做到这一点? (没有 java 或 flash)

最佳答案

根据 http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx

Alternate tokens can appear in the user-agent string for a number of reasons; usually, they identify optional features installed on your system. For example, an "SV1" token appears in the user-agent string of a user who has installed Windows XP Service Pack 2 (SP2). It is also important to note that certain non-Microsoft parties modify the user-agent string for their own purposes.

它是 SV1,因为 SP2 也是安全版本 1。所以您可以:

/sv1/i.test(navigator.userAgent)

...确定 SV1 是否包含在用户代理字符串中。我无法找到是否有任何与 SP1 关联的 token 。

关于javascript - 有没有办法用javascript检测win服务包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6400855/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com