blob: efb8699894f7275da0f7163ad5198c1ce2b02f60 (
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
40
41
42
43
44
|
---
title: FileReader.result
slug: Web/API/FileReader/result
translation_of: Web/API/FileReader/result
---
<div>{{APIRef("File API")}}</div>
<p>返回文件的内容。只有在读取操作完成后,此属性才有效,返回的数据的格式取决于是使用哪种读取方法来执行读取操作的。</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">var file = <em>instanceOfFileReader</em>.result
</pre>
<h2 id="值">值</h2>
<p>一个字符串或者一个{{domxref("ArrayBuffer")}} ,这取决于读取操作是使用哪种方法来进行的。</p>
<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("File API", "#FileReader-interface", "FileReader")}}</td>
<td>{{Spec2("File API")}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
{{Compat("api.FileReader.result")}}
<h2 id="参见">参见</h2>
<ul>
<li>{{domxref("FileReader")}}</li>
</ul>
|