判断浏览器类型

var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;

原文地址:https://www.cnblogs.com/mamo/p/3784144.html