aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-09-09 00:49:39 +0000
committerMDN <actions@users.noreply.github.com>2021-09-09 00:49:39 +0000
commitfdc77da2ba02ff78b23fc129ec7ee20c0fa28afb (patch)
treec194112508d253c64aebf8273cb8566fceaf8697 /files/zh-cn/conflicting/web
parentd6e1ef64cdf9b8592a58a30725c208753729b08a (diff)
downloadtranslated-content-fdc77da2ba02ff78b23fc129ec7ee20c0fa28afb.tar.gz
translated-content-fdc77da2ba02ff78b23fc129ec7ee20c0fa28afb.tar.bz2
translated-content-fdc77da2ba02ff78b23fc129ec7ee20c0fa28afb.zip
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/conflicting/web')
-rw-r--r--files/zh-cn/conflicting/web/api/uievent/which/index.html100
-rw-r--r--files/zh-cn/conflicting/web/javascript/reference/global_objects/string/index.html41
2 files changed, 141 insertions, 0 deletions
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
+---
+<p>{{APIRef("DOM Events")}}</p>
+
+<p>{{Non-standard_header}}</p>
+
+<p>只读属性 <strong>MouseEvent.which</strong> 显示了鼠标事件是由哪个鼠标按键被按下所触发的。其他获得该信息的标准属性是 {{ domxref("MouseEvent.button") }} 与 {{ domxref("MouseEvent.buttons") }} 。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">var buttonPressed = instanceOfMouseEvent.which
+</pre>
+
+<h3 id="返回值">返回值</h3>
+
+<p>表示一个特定按键的数字:</p>
+
+<ul>
+ <li><code>0</code>: 无</li>
+ <li><code>1</code>: 左键</li>
+ <li><code>2</code>: 中间滚轮(如果有的话)</li>
+ <li><code>3</code>: 右键</li>
+</ul>
+
+<p>如果鼠标被设置为适用于左利手人士使用,那么引发的动作恰好相反。在这种情况下,该值应该从右往左看。</p>
+
+<h2 id="规范">规范</h2>
+
+<p>无规范定义该属性。</p>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Chrome</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(1)}}<sup>[1]</sup></td>
+ <td>1.0</td>
+ <td>9.0</td>
+ <td>5.0</td>
+ <td>1.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Android</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoMobile(1) }} [1]</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] 在 {{event("mousemove")}} 事件对象上, <code>which</code> 属性被错误地设定为 <code>1</code> {{bug(1048294)}}.</p>
+
+<h2 id="See_also" name="See_also">相关内容</h2>
+
+<ul>
+ <li>{{ domxref("MouseEvent") }}</li>
+</ul>
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
+---
+<p>{{APIRef("DOM")}}</p>
+
+<p><strong><code>ByteString</code></strong> 是一个可以对应所有可能的字节序列的 UTF-8 字符串。在 JavaScript 中,当返回时 <code>ByteString</code> 时,它会映射到一个 {{jsxref("String")}} 上去; 通常,只有在和一些协议交互,进行字节和字符串的相互转换时,它才会被用到,例如 HTTP 协议。</p>
+
+<h2 id="Specification" name="Specification">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('WebIDL', '#idl-ByteString', 'ByteString')}}</td>
+ <td>{{Spec2('WebIDL')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/Web/API/DOMString">String</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Typed_arrays/String_view" title="/en-US/docs/Web/JavaScript/Typed_arrays/String_view"><code>StringView</code> – a C-like representation of strings based on typed arrays</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMString/Binary">Binary strings</a></li>
+</ul>