Navigator appName 属性
页面下方有更多实例。
定义和用法
appName 属性可返回浏览器的名称。
注释: 该属性是只读的。
浏览器支持
属性 | |||||
---|---|---|---|---|---|
appName | Yes | Yes | Yes | Yes | Yes |
语法
navigator.appName
技术细节
返回值: | 字符串,表示浏览器的名称。 返回的值因浏览器而异:
|
---|
更多实例
实例
在以下实例中演示了所有 navigator 导航器属性:
var txt = "";
txt += "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";
亲自试一试 »
txt += "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";
❮ Navigator 对象