aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/progressevent/lengthcomputable/index.html
blob: a115d34e4112d6dfaadf2f4ec611022ea7dbbb69 (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
36
37
38
39
---
title: ProgressEvent.lengthComputable
slug: Web/API/ProgressEvent/lengthComputable
translation_of: Web/API/ProgressEvent/lengthComputable
---
<p>{{APIRef("DOM Events")}}</p>

<p><code><strong>ProgressEvent.lengthComputable</strong></code> 只读属性是一个布尔{{domxref("Boolean")}} 标志,表示{{domxref("ProgressEvent")}} 所关联的资源是否具有可以计算的长度。否则 ,{{domxref("ProgressEvent.total")}} 属性将是一个无意义的值。</p>

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

<pre class="syntaxbox"><em>flag</em> = <em>ProgressEvent</em>.lengthComputable</pre>

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

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">备注</th>
  </tr>
  <tr>
   <td>{{SpecName('XMLHttpRequest', '#dom-progressevent-lengthcomputable', 'ProgressEvent.lengthComputable')}}</td>
   <td>{{Spec2('XMLHttpRequest')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

{{Compat("api.ProgressEvent.lengthComputable")}}

<h2 id="See_also">See also</h2>

<ul>
 <li>The {{domxref("ProgressEvent")}} interface it belongs to.</li>
</ul>