Terry's blog

Focus on bigdata and cloud.

博客园 首页 新随笔 联系 订阅 管理
<html xmlns="http://www.w3.org/1999/xhtml" >
    
<SCRIPT LANGUAGE="JavaScript">
function IsIE()
{
if (window.navigator.userAgent.indexOf("MSIE")>=1)
//如果浏览器为IE
{
alert(
"IE浏览器");
}

else //如果浏览器为Firefox
{
if (window.navigator.userAgent.indexOf("Firefox")>=1)
{
alert(
"Fixfox浏览器");
}

}

}

</script>
<head runat="server">
    
<title>判断浏览器类型</title>


</head>
<body onload="IsIE();">
    
<form id="form1" runat="server">
    
<div>
    
    
</div>
    
</form>
</body>
</html>
posted on 2008-04-08 14:08  王晓成  阅读(6645)  评论(0编辑  收藏  举报