var getGlobal = function(){
if(typeof self !=== 'undefined'{
return self;
}if(typeof window !=== 'undefined'{
return window;
}if(typeof global !=== 'undefined'{
return global
}
throw new Error('unable to locate global object')
};
js获取全局变量的方法
最新推荐文章于 2023-03-06 19:32:04 发布