如何检测浏览器的类型

var ua = navigator.userAgent
var isChrome = ua.indexOf('Chrome')
console.log(isChrome)
原文地址:https://www.cnblogs.com/mushitianya/p/10662011.html