判断IE Edge

var userAgent = navigator.userAgent;

var isEdge = userAgent.indexOf('Edge')>-1;

var isIE = window.ActiveXObject || "ActiveXObject" in window;

if(isEdge||isIE){

//执行

}

posted @ 2019-04-11 07:44  Emma.Zhao  阅读(257)  评论(0编辑  收藏  举报