zoukankan      html  css  js  c++  java
  • js获取浏览器信息

    function message()
    {
    txt = "<p>浏览器代码名: " + navigator.appCodeName + "</p>";
    txt+= "<p>浏览器名称: " + navigator.appName + "</p>";    类型
    txt+= "<p>浏览器平台和版本: " + navigator.appVersion + "</p>";  版本
     
    txt+= "<p>是否开启cookie: " + navigator.cookieEnabled + "</p>";
    txt+= "<p>操作系统平台: " + navigator.platform + "</p>"; txt+= "<p>User-agent头部值: " + navigator.userAgent + "</p>";
    document.getElementById("example").innerHTML=txt;
    if ((navigator.appName=="Netscape" || navigator.appName=="Microsoft Internet Explorer") && (parseFloat(navigator.appVersion)>=4))
    { alert("您的浏览器够先进了!"); }
    else
    { alert("是时候升级您的浏览器了!");
    }
    }
     
                            navigator.browserLanguage    浏览器语言
                            navigator.cpuClass   cpu类型
                            navigator.platform   操作系统
                            navigator.systemLanguage  系统语言
                            navigator.userLanguage 用户语言
                            navigator.onLine  在线情况
                            window.screen.width+"x"+window.screen.height  屏幕分辨率
                            window.screen.colorDepth  颜色
                            window.screen.fontSmoothingEnabled  字体平滑
  • 相关阅读:
    c#pda(wince)摄像头拍照程序
    单点登录在ASP.NET上的简单实现(图)
    写文件 指定固定开始位置
    关于"System.Web.HttpException: 超过了最大请求长度。"错误的解决
    配置本地YUM:
    开启mysql的审计功能
    用GRE通道连通机房之间的私网
    让nginx支持PATH_INFO
    Linux在本地使用yum安装软件
    sysbench的安装及使用
  • 原文地址:https://www.cnblogs.com/cina33blogs/p/7772230.html
Copyright © 2011-2022 走看看