js一段小代码(浏览器用alert,否则用console)
2017-08-28 09:16 很大很老实 阅读(228) 评论(0) 收藏 举报(function(){ var root=this, isBrowserSide=false; if(typeof window !=="undefined" && root===window){ isBrowserSide=true; } if(isBrowserSide){ alert('alert wcf'); }else{ console.log('console wcf'); } }).call(this);
浙公网安备 33010602011771号