From fdc77da2ba02ff78b23fc129ec7ee20c0fa28afb Mon Sep 17 00:00:00 2001 From: MDN Date: Thu, 9 Sep 2021 00:49:39 +0000 Subject: [CRON] sync translated content --- files/zh-cn/_redirects.txt | 3 + files/zh-cn/_wikihistory.json | 50 +++------- .../conflicting/web/api/uievent/which/index.html | 100 ++++++++++++++++++++ .../reference/global_objects/string/index.html | 41 +++++++++ files/zh-cn/web/api/bytestring/index.html | 40 -------- files/zh-cn/web/api/keyboardevent/which/index.html | 101 -------------------- files/zh-cn/web/api/mouseevent/which/index.html | 99 -------------------- files/zh-cn/web/api/uievent/which/index.html | 102 +++++++++++++++++++++ 8 files changed, 261 insertions(+), 275 deletions(-) create mode 100644 files/zh-cn/conflicting/web/api/uievent/which/index.html create mode 100644 files/zh-cn/conflicting/web/javascript/reference/global_objects/string/index.html delete mode 100644 files/zh-cn/web/api/bytestring/index.html delete mode 100644 files/zh-cn/web/api/keyboardevent/which/index.html delete mode 100644 files/zh-cn/web/api/mouseevent/which/index.html create mode 100644 files/zh-cn/web/api/uievent/which/index.html (limited to 'files/zh-cn') diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index ff820f35f0..35d2de28cb 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1235,6 +1235,7 @@ /zh-CN/docs/Web/API/Blob.size /zh-CN/docs/Web/API/Blob/size /zh-CN/docs/Web/API/Blob.slice /zh-CN/docs/Web/API/Blob/slice /zh-CN/docs/Web/API/Blob.type /zh-CN/docs/Web/API/Blob/type +/zh-CN/docs/Web/API/ByteString /zh-CN/docs/conflicting/Web/JavaScript/Reference/Global_Objects/String /zh-CN/docs/Web/API/CSSStyleSheet.insertRule /zh-CN/docs/Web/API/CSSStyleSheet/insertRule /zh-CN/docs/Web/API/CSS分页规则 /zh-CN/docs/Web/API/CSSPageRule /zh-CN/docs/Web/API/CanvasCaptureMediaStream /zh-CN/docs/Web/API/CanvasCaptureMediaStreamTrack @@ -1381,8 +1382,10 @@ /zh-CN/docs/Web/API/Index /zh-CN/docs/conflicting/Web/API /zh-CN/docs/Web/API/IndexedDB_API/IDBObjectStore /zh-CN/docs/Web/API/IDBObjectStore /zh-CN/docs/Web/API/Intersection_Observer_API/点观察者API的时序元素可见性 /zh-CN/docs/Web/API/Intersection_Observer_API/Timing_element_visibility +/zh-CN/docs/Web/API/KeyboardEvent/which /zh-CN/docs/Web/API/UIEvent/which /zh-CN/docs/Web/API/Location.replace /zh-CN/docs/Web/API/Location/replace /zh-CN/docs/Web/API/MediaStream.addTrack /zh-CN/docs/Web/API/MediaStream/addTrack +/zh-CN/docs/Web/API/MouseEvent/which /zh-CN/docs/conflicting/Web/API/UIEvent/which /zh-CN/docs/Web/API/Navigator.battery /zh-CN/docs/Web/API/Navigator/battery /zh-CN/docs/Web/API/Navigator.buildID /zh-CN/docs/Web/API/Navigator/buildID /zh-CN/docs/Web/API/Navigator.cookieEnabled /zh-CN/docs/Web/API/Navigator/cookieEnabled diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index ea8dba13d9..1d166827cc 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -8264,13 +8264,6 @@ "Spikef" ] }, - "Web/API/ByteString": { - "modified": "2019-07-13T11:30:42.104Z", - "contributors": [ - "RainSlide", - "zhouxu" - ] - }, "Web/API/CDATASection": { "modified": "2020-10-15T21:50:11.923Z", "contributors": [ @@ -16601,12 +16594,6 @@ "cuixiping" ] }, - "Web/API/KeyboardEvent/which": { - "modified": "2020-10-15T22:35:00.980Z", - "contributors": [ - "xgqfrms" - ] - }, "Web/API/LocalFileSystemSync": { "modified": "2019-03-23T22:09:04.520Z", "contributors": [ @@ -17290,12 +17277,6 @@ "Dcfm" ] }, - "Web/API/MouseEvent/which": { - "modified": "2019-03-18T21:11:17.379Z", - "contributors": [ - "WayneCui" - ] - }, "Web/API/MouseEvent/x": { "modified": "2019-03-23T22:05:16.814Z", "contributors": [ @@ -20821,6 +20802,12 @@ "pans9" ] }, + "Web/API/UIEvent/which": { + "modified": "2020-10-15T22:35:00.980Z", + "contributors": [ + "xgqfrms" + ] + }, "Web/API/URL": { "modified": "2020-10-15T21:33:08.666Z", "contributors": [ @@ -47300,6 +47287,12 @@ "hibernake" ] }, + "conflicting/Web/API/UIEvent/which": { + "modified": "2019-03-18T21:11:17.379Z", + "contributors": [ + "WayneCui" + ] + }, "conflicting/Web/API/URL": { "modified": "2019-03-23T22:22:37.359Z", "contributors": [ @@ -47829,23 +47822,10 @@ ] }, "conflicting/Web/JavaScript/Reference/Global_Objects/String": { - "modified": "2020-10-15T21:27:29.084Z", + "modified": "2019-07-13T11:30:42.104Z", "contributors": [ - "gqbre", - "pabloyshi", - "zhazhjie", - "zqyue", - "Ende93", - "midare", - "Yuxuan_Jiang", - "micheal-death", - "xgqfrms-GitHub", - "Hugh", - "terrycafe520", - "qianjiahao", - "paddingme", - "teoli", - "ziyunfei" + "RainSlide", + "zhouxu" ] }, "conflicting/Web/JavaScript/Reference/Global_Objects/Symbol": { diff --git a/files/zh-cn/conflicting/web/api/uievent/which/index.html b/files/zh-cn/conflicting/web/api/uievent/which/index.html new file mode 100644 index 0000000000..760958f975 --- /dev/null +++ b/files/zh-cn/conflicting/web/api/uievent/which/index.html @@ -0,0 +1,100 @@ +--- +title: MouseEvent.which +slug: conflicting/Web/API/UIEvent/which +tags: + - API + - 只读 + - 非标准 + - 鼠标事件 +translation_of: Web/API/MouseEvent/which +original_slug: Web/API/MouseEvent/which +--- +

{{APIRef("DOM Events")}}

+ +

{{Non-standard_header}}

+ +

只读属性 MouseEvent.which 显示了鼠标事件是由哪个鼠标按键被按下所触发的。其他获得该信息的标准属性是 {{ domxref("MouseEvent.button") }} 与 {{ domxref("MouseEvent.buttons") }} 。

+ +

语法

+ +
var buttonPressed = instanceOfMouseEvent.which
+
+ +

返回值

+ +

表示一个特定按键的数字:

+ + + +

如果鼠标被设置为适用于左利手人士使用,那么引发的动作恰好相反。在这种情况下,该值应该从右往左看。

+ +

规范

+ +

无规范定义该属性。

+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureEdgeFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop(1)}}[1]1.09.05.01.0
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureEdgeFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{ CompatGeckoMobile(1) }} [1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

[1] 在 {{event("mousemove")}} 事件对象上, which 属性被错误地设定为 1 {{bug(1048294)}}.

+ +

相关内容

+ + diff --git a/files/zh-cn/conflicting/web/javascript/reference/global_objects/string/index.html b/files/zh-cn/conflicting/web/javascript/reference/global_objects/string/index.html new file mode 100644 index 0000000000..b2da7aeebf --- /dev/null +++ b/files/zh-cn/conflicting/web/javascript/reference/global_objects/string/index.html @@ -0,0 +1,41 @@ +--- +title: ByteString +slug: conflicting/Web/JavaScript/Reference/Global_Objects/String +tags: + - API + - DOM + - String + - WebIDL + - 参考 + - 字符串 +translation_of: Web/API/ByteString +original_slug: Web/API/ByteString +--- +

{{APIRef("DOM")}}

+ +

ByteString 是一个可以对应所有可能的字节序列的 UTF-8 字符串。在 JavaScript 中,当返回时 ByteString 时,它会映射到一个 {{jsxref("String")}} 上去; 通常,只有在和一些协议交互,进行字节和字符串的相互转换时,它才会被用到,例如 HTTP 协议。

+ +

规范

+ + + + + + + + + + + + + + +
规范状态备注
{{SpecName('WebIDL', '#idl-ByteString', 'ByteString')}}{{Spec2('WebIDL')}}Initial definition.
+ +

参见

+ + diff --git a/files/zh-cn/web/api/bytestring/index.html b/files/zh-cn/web/api/bytestring/index.html deleted file mode 100644 index 7c3c0d004f..0000000000 --- a/files/zh-cn/web/api/bytestring/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: ByteString -slug: Web/API/ByteString -tags: - - API - - DOM - - String - - WebIDL - - 参考 - - 字符串 -translation_of: Web/API/ByteString ---- -

{{APIRef("DOM")}}

- -

ByteString 是一个可以对应所有可能的字节序列的 UTF-8 字符串。在 JavaScript 中,当返回时 ByteString 时,它会映射到一个 {{jsxref("String")}} 上去; 通常,只有在和一些协议交互,进行字节和字符串的相互转换时,它才会被用到,例如 HTTP 协议。

- -

规范

- - - - - - - - - - - - - - -
规范状态备注
{{SpecName('WebIDL', '#idl-ByteString', 'ByteString')}}{{Spec2('WebIDL')}}Initial definition.
- -

参见

- - diff --git a/files/zh-cn/web/api/keyboardevent/which/index.html b/files/zh-cn/web/api/keyboardevent/which/index.html deleted file mode 100644 index 56136f398e..0000000000 --- a/files/zh-cn/web/api/keyboardevent/which/index.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: KeyboardEvent.which -slug: Web/API/KeyboardEvent/which -tags: - - Code - - DOM - - Key - - KeyboardEvent - - keyCode - - which -translation_of: Web/API/KeyboardEvent/which ---- -
{{ APIRef("DOM Events") }} {{Deprecated_header}}
- -

{{domxref("KeyboardEvent")}} 接口的 which 只读属性返回所按下键的数字 keyCode 或所按下字母数字键的字符代码 (charCode) 。

- -

语法

- -
var keyResult = event.which;
-
- -

返回值

- - - -

例子

- -
<html>
-<head>
-<title>charCode/keyCode/which example</title>
-
-<script type="text/javascript">
-
-function showKeyPress(evt) {
-alert("onkeypress handler: \n"
-      + "keyCode property: " + evt.keyCode + "\n"
-      + "which property: " + evt.which + "\n"
-      + "charCode property: " + evt.charCode + "\n"
-      + "Character Key Pressed: "
-      + String.fromCharCode(evt.charCode) + "\n"
-     );
-}
-
-
-function keyDown(evt) {
-alert("onkeydown handler: \n"
-      + "keyCode property: " + evt.keyCode + "\n"
-      + "which property: " + evt.which + "\n"
-     );
-}
-
-</script>
-</head>
-
-<body
- onkeypress="showKeyPress(event);"
- onkeydown="keyDown(event);"
->
-
-<p>Please press any key.</p>
-
-</body>
-</html>
-
- -

规范

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM3 Events','#legacy-interface-KeyboardEvent','KeyboardEvent.which')}}{{Spec2('DOM3 Events')}}Initial definition; specified as deprecated
- -

浏览器兼容性

- - - -

{{Compat("api.KeyboardEvent.which")}}

- -

See also

- - - -
-
-
diff --git a/files/zh-cn/web/api/mouseevent/which/index.html b/files/zh-cn/web/api/mouseevent/which/index.html deleted file mode 100644 index 591412dda3..0000000000 --- a/files/zh-cn/web/api/mouseevent/which/index.html +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: MouseEvent.which -slug: Web/API/MouseEvent/which -tags: - - API - - 只读 - - 非标准 - - 鼠标事件 -translation_of: Web/API/MouseEvent/which ---- -

{{APIRef("DOM Events")}}

- -

{{Non-standard_header}}

- -

只读属性 MouseEvent.which 显示了鼠标事件是由哪个鼠标按键被按下所触发的。其他获得该信息的标准属性是 {{ domxref("MouseEvent.button") }} 与 {{ domxref("MouseEvent.buttons") }} 。

- -

语法

- -
var buttonPressed = instanceOfMouseEvent.which
-
- -

返回值

- -

表示一个特定按键的数字:

- - - -

如果鼠标被设置为适用于左利手人士使用,那么引发的动作恰好相反。在这种情况下,该值应该从右往左看。

- -

规范

- -

无规范定义该属性。

- -

浏览器兼容性

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureEdgeFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop(1)}}[1]1.09.05.01.0
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureEdgeFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{ CompatGeckoMobile(1) }} [1]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

[1] 在 {{event("mousemove")}} 事件对象上, which 属性被错误地设定为 1 {{bug(1048294)}}.

- -

相关内容

- - diff --git a/files/zh-cn/web/api/uievent/which/index.html b/files/zh-cn/web/api/uievent/which/index.html new file mode 100644 index 0000000000..b94bab0616 --- /dev/null +++ b/files/zh-cn/web/api/uievent/which/index.html @@ -0,0 +1,102 @@ +--- +title: KeyboardEvent.which +slug: Web/API/UIEvent/which +tags: + - Code + - DOM + - Key + - KeyboardEvent + - keyCode + - which +translation_of: Web/API/KeyboardEvent/which +original_slug: Web/API/KeyboardEvent/which +--- +
{{ APIRef("DOM Events") }} {{Deprecated_header}}
+ +

{{domxref("KeyboardEvent")}} 接口的 which 只读属性返回所按下键的数字 keyCode 或所按下字母数字键的字符代码 (charCode) 。

+ +

语法

+ +
var keyResult = event.which;
+
+ +

返回值

+ + + +

例子

+ +
<html>
+<head>
+<title>charCode/keyCode/which example</title>
+
+<script type="text/javascript">
+
+function showKeyPress(evt) {
+alert("onkeypress handler: \n"
+      + "keyCode property: " + evt.keyCode + "\n"
+      + "which property: " + evt.which + "\n"
+      + "charCode property: " + evt.charCode + "\n"
+      + "Character Key Pressed: "
+      + String.fromCharCode(evt.charCode) + "\n"
+     );
+}
+
+
+function keyDown(evt) {
+alert("onkeydown handler: \n"
+      + "keyCode property: " + evt.keyCode + "\n"
+      + "which property: " + evt.which + "\n"
+     );
+}
+
+</script>
+</head>
+
+<body
+ onkeypress="showKeyPress(event);"
+ onkeydown="keyDown(event);"
+>
+
+<p>Please press any key.</p>
+
+</body>
+</html>
+
+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM3 Events','#legacy-interface-KeyboardEvent','KeyboardEvent.which')}}{{Spec2('DOM3 Events')}}Initial definition; specified as deprecated
+ +

浏览器兼容性

+ + + +

{{Compat("api.KeyboardEvent.which")}}

+ +

See also

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