zoukankan      html  css  js  c++  java
  • 如何判断浏览器类型

     
    <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>
  • 相关阅读:
    近期目标
    HDU
    BZOJ
    UVALive
    UVA
    HNOI2004 宠物收养所 (平衡二叉树)
    UVA
    HDU
    POJ
    康托展开与逆康托展开模板(O(n^2)/O(nlogn))
  • 原文地址:https://www.cnblogs.com/dongzhiquan/p/1994900.html
Copyright © 2011-2022 走看看