var userAgent = navigator.userAgent;
var isEdge = userAgent.indexOf('Edge')>-1;
var isIE = window.ActiveXObject || "ActiveXObject" in window;
if(isEdge||isIE){
//执行
}