JS判断PC操作系统版本
var version = navigator.userAgent;
console.log(version);
//"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3223.0 Safari/537.36"
if(version.indexOf("Windows NT 5")!=-1) {
console.log("这是XP系统");
}else if(version.indexOf("Windows NT 7")!=-1){
console.log("这是win7系统");
}else if(version.indexOf("Windows NT 10")!=-1){
console.log("这是win10系统");
}