美文网首页
如何判断用户的系统是32位还是64位?

如何判断用户的系统是32位还是64位?

作者: lMadman | 来源:发表于2017-04-10 14:31 被阅读0次
    function getCPU() {
                var agent=navigator.userAgent.toLowerCase();
               /* console.log(agent);*/
                if(agent.indexOf("win64") =='-1'){
                    return -1; //不是windows系统
                }
                if(agent.indexOf("win64")>=0||agent.indexOf("wow64")>=0) return "x64";
                return navigator.cpuClass;
            }
    

    相关文章

      网友评论

          本文标题:如何判断用户的系统是32位还是64位?

          本文链接:https://www.haomeiwen.com/subject/wxvsattx.html