From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/positionoptions/timeout/index.html | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 files/zh-cn/web/api/positionoptions/timeout/index.html (limited to 'files/zh-cn/web/api/positionoptions/timeout') diff --git a/files/zh-cn/web/api/positionoptions/timeout/index.html b/files/zh-cn/web/api/positionoptions/timeout/index.html new file mode 100644 index 0000000000..0362db0249 --- /dev/null +++ b/files/zh-cn/web/api/positionoptions/timeout/index.html @@ -0,0 +1,95 @@ +--- +title: PositionOptions.timeout +slug: Web/API/PositionOptions/timeout +tags: + - API +translation_of: Web/API/PositionOptions/timeout +--- +
{{APIRef("Geolocation API")}}
+ +

PositionOptions.timeout 属性是一个 long 型正数,它代表机器能够等待方法返回位置的最长时间(单位是毫秒)。预设值是 Infinity,这意味着 getCurrentPosition () 此方法在没有可用的位置前不会有任何回复。

+ +

语法

+ +
positionOptions.timeout = timeLength
+
+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#timeout', 'PositionOptions.timeout')}}{{Spec2('Geolocation')}}初始定义
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support5{{CompatGeckoDesktop("1.9.1")}}910.60
+ {{CompatNo}} 15.0
+ 16.0
5
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("4")}}{{CompatUnknown}}10.60{{CompatUnknown}}
+
+ +

相关链接

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