1.JavaScript(js)判断浏览器是IE
function isIE () {
return !isNaN(Number(document.documentMode));
};
2.JavaScript(js)判断浏览器是Edge
function isEdge() {
return navigator.userAgent.indexOf('Edge') > -1;
}
3.JavaScript(js)判断浏览器是Firefox
function isFirefox() {
return !!window.navigator.userAgent.match(/firefox/i);
}
网友评论