aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/filereader/result/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/filereader/result/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/filereader/result/index.html')
-rw-r--r--files/zh-cn/web/api/filereader/result/index.html96
1 files changed, 96 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/filereader/result/index.html b/files/zh-cn/web/api/filereader/result/index.html
new file mode 100644
index 0000000000..d459d6af67
--- /dev/null
+++ b/files/zh-cn/web/api/filereader/result/index.html
@@ -0,0 +1,96 @@
+---
+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>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>特性</th>
+ <th>Firefox (Gecko)</th>
+ <th>Chrome</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>基本特性支持</td>
+ <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td>
+ <td>7</td>
+ <td>10<sup>[2]</sup></td>
+ <td>12.02<sup>[3]</sup></td>
+ <td>6.0.2</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>特性</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>Android</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基本特性支持</td>
+ <td>32</td>
+ <td>3</td>
+ <td>10</td>
+ <td>11.5</td>
+ <td>6.1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] 早于 Gecko 2.0 beta 7 (Firefox 4.0 beta 7)的版本,所有 {{domxref("Blob")}} 的参数归属于 {{domxref("File")}};现在已经更新为正确的技术规范。早于Gecko 13.0 {{geckoRelease("13.0")}} 的版本,<code>FileReader.error</code> 属性返回一个 {{domxref("FileError")}} 对象,这个接口已经被移除。现在根据最新的FileAPI 草案<code>FileReader.error返回一个</code>{{domxref("DOMError")}} 对象。</p>
+
+<p>[2] IE9拥有<a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>。</p>
+
+<p>[3] Opera 11.1版本拥有<a href="http://www.opera.com/docs/specs/presto28/file/">partial support</a>。</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{domxref("FileReader")}}</li>
+</ul>