aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/keyboardevent/repeat/index.html
blob: c35e22442ed9716d248734345850ab1dee2beb75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: KeyboardEvent.repeat
slug: Web/API/KeyboardEvent/repeat
tags:
  - KeyboardEvent
translation_of: Web/API/KeyboardEvent/repeat
---
<p>{{APIRef("DOM Events")}}</p>

<p><code><strong>KeyboardEvent.repeat</strong></code>是一个只读属性,返回一个布尔值{{jsxref("Boolean")}},如果按键被一直按住,返回值为<code>true</code></p>

<h2 id="语法">语法</h2>

<pre>var <em>repeat</em> = <em>event</em>.repeat;</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('DOM3 Events', '#widl-KeyboardEvent-repeat', 'KeyboardEvent.repeat')}}</td>
   <td>{{Spec2('DOM3 Events')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="兼容性">兼容性</h2>

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