From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors --- files/zh-cn/web/api/file/index.html | 2 +- files/zh-cn/web/api/file/using_files_from_web_applications/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/api/file') diff --git a/files/zh-cn/web/api/file/index.html b/files/zh-cn/web/api/file/index.html index d87a8ed3f0..12fbc5bee5 100644 --- a/files/zh-cn/web/api/file/index.html +++ b/files/zh-cn/web/api/file/index.html @@ -13,7 +13,7 @@ translation_of: Web/API/File

文件(File)接口提供有关文件的信息,并允许网页中的 JavaScript 访问其内容。

-

通常情况下, File 对象是来自用户在一个 {{HTMLElement("input")}} 元素上选择文件后返回的 {{domxref("FileList")}} 对象,也可以是来自由拖放操作生成的 {{domxref("DataTransfer")}} 对象,或者来自 {{domxref("HTMLCanvasElement")}} 上的 mozGetAsFile() API。在Gecko中,特权代码可以创建代表任何本地文件的File对象,而无需用户交互(有关详细信息,请参阅{{anch("注意事项")}}。

+

通常情况下, File 对象是来自用户在一个 {{HTMLElement("input")}} 元素上选择文件后返回的 {{domxref("FileList")}} 对象,也可以是来自由拖放操作生成的 {{domxref("DataTransfer")}} 对象,或者来自 {{domxref("HTMLCanvasElement")}} 上的 mozGetAsFile() API。在Gecko中,特权代码可以创建代表任何本地文件的File对象,而无需用户交互(有关详细信息,请参阅注意事项

File 对象是特殊类型的 {{domxref("Blob")}},且可以用在任意的 Blob 类型的 context 中。比如说, {{domxref("FileReader")}}, {{domxref("URL.createObjectURL()")}}, {{domxref("ImageBitmapFactories.createImageBitmap()", "createImageBitmap()")}}, 及 {{domxref("XMLHttpRequest", "", "send()")}} 都能处理 Blob File

diff --git a/files/zh-cn/web/api/file/using_files_from_web_applications/index.html b/files/zh-cn/web/api/file/using_files_from_web_applications/index.html index 8d2a0f91aa..24f339f10b 100644 --- a/files/zh-cn/web/api/file/using_files_from_web_applications/index.html +++ b/files/zh-cn/web/api/file/using_files_from_web_applications/index.html @@ -284,7 +284,7 @@ function dragover(e) { </div> -

这确定我们的文件 {{ HTMLElement("input") }} 元素显示为一个可以调用文件选择器的链接(我们隐藏了文件输入元素来阻止显示用户不友好的界面)。这个在 {{ anch("Using hidden file input elements using the click() method") }}节已经说明了这种调用文件选择器的方法。

+

这确定我们的文件 {{ HTMLElement("input") }} 元素显示为一个可以调用文件选择器的链接(我们隐藏了文件输入元素来阻止显示用户不友好的界面)。这个在 通过 click() 方法使用隐藏的 file input 元素已经说明了这种调用文件选择器的方法。

handleFiles() 方法如下:

-- cgit v1.2.3-54-g00ecf