From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/navigatorid/index.html | 120 +++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 files/zh-cn/web/api/navigatorid/index.html (limited to 'files/zh-cn/web/api/navigatorid/index.html') diff --git a/files/zh-cn/web/api/navigatorid/index.html b/files/zh-cn/web/api/navigatorid/index.html new file mode 100644 index 0000000000..5fab09ada5 --- /dev/null +++ b/files/zh-cn/web/api/navigatorid/index.html @@ -0,0 +1,120 @@ +--- +title: NavigatorID +slug: Web/API/NavigatorID +translation_of: Web/API/NavigatorID +--- +

{{APIRef("HTML DOM")}}

+ +

NavigatorID 接口包含浏览器识别相关的方法和属性。

+ +

没有一个 NavigatorID 类型的对象,他是其他接口,如 {{domxref("Navigator")}} 或 {{domxref("WorkerNavigator")}} 实现了该接口。

+ +

属性

+ +

NavigatorID 接口没有继承任何属性。

+ +
+
{{domxref("NavigatorID.appCodeName")}} {{readonlyInline}}{{experimental_inline}}
+
任何浏览器中,总是返回 'Gecko'。该属性仅仅是为了保持兼容性。
+
{{domxref("NavigatorID.appName")}} {{readonlyInline}}
+
返回浏览器的官方名称。不要指望该属性返回正确的值。
+
{{domxref("NavigatorID.appVersion")}} {{readonlyInline}}
+
返回一个字符串,表示浏览器的版本。不要指望该属性返回正确的值。
+
{{domxref("NavigatorID.platform")}} {{readonlyInline}}
+
返回一个字符串,表示浏览器的所在系统平台。
+
{{domxref("NavigatorID.product")}} {{readonlyInline}}
+
返回当前浏览器的产品名称(如,"Gecko")。
+
{{domxref("NavigatorID.userAgent")}} {{readonlyInline}}
+
返回当前浏览器的用户代理字符串(user agent string)。
+
+ +

方法

+ +

NavigatorID 接口没有继承任何方法。

+ +
+
{{domxref("NavigatorID.taintEnabled()")}} {{deprecated_inline()}} {{experimental_inline}}
+
总是返回 false。JavaScript taint/untaint 函数在 JavaScript 1.2 中被移除了。该方法只是为了兼容性。
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#navigatorid', 'NavigatorID')}}{{Spec2('HTML WHATWG')}}Added the appCodeName property and the taintEnabled() method,  for compatibility purpose.
{{SpecName('HTML5 W3C', '#navigatorid', 'NavigatorID')}}{{Spec2('HTML5 W3C')}}Initial specification.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf