Navigator appName 属性

Navigator 对象参考手册 Navigator 对象

定义和用法

appName 属性可返回浏览器的名称。

语法

navigator.appName

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主要浏览器都支持 appName 属性


实例

返回浏览器的名称:

<script>
  document.write("浏览器名称: " + navigator.appName);
</script>

尝试一下 »


更多实例

本例包含了所有的 navigator 属性。

<div id="example"></div>
<script>
  txt = "<p>浏览器代号: " + navigator.appCodeName + "</p>";
  txt += "<p>浏览器名称: " + navigator.appName + "</p>";
  txt += "<p>浏览器版本: " + navigator.appVersion + "</p>";
  txt += "<p>启用Cookies: " + navigator.cookieEnabled + "</p>";
  txt += "<p>硬件平台: " + navigator.platform + "</p>";
  txt += "<p>用户代理: " + navigator.userAgent + "</p>";
  txt += "<p>用户代理语言: " + navigator.systemLanguage + "</p>";
  document.getElementById("example").innerHTML = txt;
</script>

尝试一下 »


Navigator 对象参考手册 Navigator 对象