常用JS的代码 浏览器判断A

收藏本信息编号:73 发布时间:2009-07-01 截止日期: 地区:北京市.宣武区

<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>

发布人信息

[错误报告] [推荐] [收藏][打印] [关闭] [返回顶部]

当前共有0人发表了评论.

推荐信息

最新信息