您的位置:首页 > 其它

flash判断当前使用的浏览器类型

2012-11-28 15:06 567 查看
var bType:String = "浏览器ua信息:";

bType += ExternalInterface.call("eval","navigator.userAgent");

bType = bType.toLowerCase();

txt.htmlText = bType;

txt.htmlText +="<br />您使用的是:"

if (bType.indexOf("msie") != -1)

{

if (bType.indexOf("se 2.x") != -1)

{

txt.htmlText += "搜狗浏览器";

}

else

{

txt.htmlText += "IE内核非搜狗浏览器";

}

}

if (bType.indexOf("firefox") != -1)

{

txt.htmlText += "firefox浏览器";

}

if (bType.indexOf("chrome") != -1)

{

txt.htmlText += "firefox浏览器";

}

if (bType.indexOf("opera") != -1)

{

txt.htmlText += "firefox浏览器";

}

if (bType.indexOf("safari") != -1)

{

txt.htmlText += "safari浏览器";

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: