aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/xmlhttprequest/upload/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/xmlhttprequest/upload/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/xmlhttprequest/upload/index.html')
-rw-r--r--files/zh-cn/web/api/xmlhttprequest/upload/index.html116
1 files changed, 116 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/xmlhttprequest/upload/index.html b/files/zh-cn/web/api/xmlhttprequest/upload/index.html
new file mode 100644
index 0000000000..eed9701557
--- /dev/null
+++ b/files/zh-cn/web/api/xmlhttprequest/upload/index.html
@@ -0,0 +1,116 @@
+---
+title: XMLHttpRequest.upload
+slug: Web/API/XMLHttpRequest/upload
+translation_of: Web/API/XMLHttpRequest/upload
+---
+<p>{{APIRef('XMLHttpRequest')}}</p>
+
+<p><strong>XMLHttpRequest.upload 属性返回一个</strong> {{domxref("XMLHttpRequestUpload")}}对象,用来表示上传的进度。这个对象是不透明的,但是作为一个{{domxref("XMLHttpRequestEventTarget")}},可以通过对其绑定事件来追踪它的进度。</p>
+
+<p>可以被绑定在upload对象上的事件监听器如下:</p>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td class="header">事件</td>
+ <td class="header">相应属性的信息类型</td>
+ </tr>
+ <tr>
+ <td><code>onloadstart</code></td>
+ <td>获取开始</td>
+ </tr>
+ <tr>
+ <td><code>onprogress</code></td>
+ <td>数据传输进行中</td>
+ </tr>
+ <tr>
+ <td><code>onabort</code></td>
+ <td>获取操作终止</td>
+ </tr>
+ <tr>
+ <td><code>onerror</code></td>
+ <td>获取失败</td>
+ </tr>
+ <tr>
+ <td><code>onload</code></td>
+ <td>获取成功</td>
+ </tr>
+ <tr>
+ <td><code>ontimeout</code></td>
+ <td>获取操作在用户规定的时间内未完成</td>
+ </tr>
+ <tr>
+ <td><code>onloadend</code></td>
+ <td>获取完成(不论成功与否)</td>
+ </tr>
+ </tbody>
+</table>
+
+<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('XMLHttpRequest', '#the-upload-attribute')}}</td>
+ <td>{{Spec2('XMLHttpRequest')}}</td>
+ <td>WHATWG living standard</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>