• Navigator 对象


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
     <head>
      <title> New Document </title>
      <meta name="Generator" content="EditPlus">
      <meta name="Author" content="">
      <meta name="Keywords" content="">
      <meta name="Description" content="">
     </head>
    
     <body>
      <script type="text/javascript">
      document.write(navigator.appName+"<br>");//返回浏览器名称
    
      document.write(navigator.appVersion+"<br>");//返回浏览器代码明
    
      document.write(navigator.browserLanguage+"<br>");//返回当前浏览器的语言
    
      document.write(navigator.cookieEnabled+"<br>");//返回浏览器是否启用cookie的布尔值
    
      document.write(navigator.cpuClass+"<br>");//返回系统浏览器的cpu等级
    
      document.write(navigator.platform+"<br>");//返回运行浏览器的操作系统平台
    
      document.write(navigator.systemLanguage+"<br>");//返回os使用的默认语言
    
      document.write(navigator.userLanguage+"<br>");//返回OS的自然语言设置
    
    
      </script>
     </body>
    </html>
    

    Navigator 对象描述

    Navigator 对象包含的属性描述了正在使用的浏览器。可以使用这些属性进行平台专用的配置。

    虽然这个对象的名称显而易见的是 Netscape 的 Navigator 浏览器,但其他实现了 JavaScript 的浏览器也支持这个对象。

    Navigator 对象的实例是唯一的,可以用 Window 对象的 navigator 属性来引用它。



     

  • 相关阅读:
    黑色边影,
    拉伸的代码,
    一定是selection的原因啊,要不然呢,
    status bar的差别,
    黄色,
    域名错了,
    node=day4
    PS切片
    移动端插件IScroll.js
    移动web资源概论
  • 原文地址:https://www.cnblogs.com/pangblog/p/3327513.html
Copyright © 2020-2023  润新知