function isIE(){ //ie? 判断是不是ie
if (window.navigator.userAgent.indexOf("MSIE")>=1)
return true;
else
return false;
}
if (window.navigator.userAgent.indexOf("MSIE")>=1)
return true;
else
return false;
}
本文将深入解析JavaScript代码片段,介绍如何通过浏览器的User Agent字符串判断当前是否处于IE浏览器环境下,从而实现针对不同浏览器的适配与优化。

被折叠的 条评论
为什么被折叠?