var userAgent = navigator.userAgent;
var isEdge = userAgent.indexOf('Edge')>-1;
var isIE = window.ActiveXObject || "ActiveXObject" in window;
if(isEdge||isIE){
//执行
}
var userAgent = navigator.userAgent;
var isEdge = userAgent.indexOf('Edge')>-1;
var isIE = window.ActiveXObject || "ActiveXObject" in window;
if(isEdge||isIE){
//执行
}
转载于:https://www.cnblogs.com/emma-zhao/p/10687395.html