navigator.userAgentData.getHighEntropyValues(["architecture", "bitness"]) .then(ua => { if (navigator.userAgentData.platform === "Windows") { if (ua.architecture === 'x86') { if (ua.bitness === '64') { console.log("x86_64"); } else if (ua.bitness === '32') { console.log("x86"); } } else if (ua.architecture === 'arm') { if (ua.bitness === '64') { console.log("ARM64"); } else if (ua.bitness === '32') { console.log("ARM32"); } } } else { console.log("Not running on Windows"); } });  微软官方文档: > [https://learn.microsoft.com/zh-cn/microsoft-edge/web-> platform...](https://link.segmentfault.com/?enc=OBvQP6iTGTGoFk%2Fhyc%2F8gA%3D%3D.DxsrQydkCcoqAt8B1XeyzCVFEvbUAYvSpcZ0OHPpcT5rhwFgvGV76DTeWG%2Bty6uiiqzLE6DJyuvivUMNlxkPosH0Ifz80UzVwTl%2BVAP3o6eswPl5MwK5JmnXb%2FSrsFuY) 截图中的用浏览器api就可以获取 navigator.userAgent; 