gpt4 book ai didi

javascript - 如何在浏览器中更改 "File Upload"对话框的标题?

转载 作者:数据小太阳 更新时间:2023-10-29 03:56:36 24 4
gpt4 key购买 nike

是否可以在任何常用浏览器(如 IE 或 FireFox)中更改“文件上传”对话框的标题?

enter image description here

enter image description here

最佳答案

检查文档页面我找不到这样的东西......我想这是不可能的。

Control typesForms 部分我们找到 the input[type='file']这被描述为:

file select

This control type allows the user to select files so that their contents may be submitted with a form. The INPUT element is used to create a file select control.

然后我们检查Input elements我们找到了一个使用 input 的不同类型的元素列表:

还有 file 类型:

file

Creates a file select control. User agents may use the value of the value attribute as the initial file name.

因此,很遗憾,总而言之,这是不可能的。


您可以选择的替代方法是在 HTML 内部打开的弹出窗口上使用拖放操作:

-------------------------------------- <-- the full page
| |
| |
| |----------------| <------------ The popup
| | Your title | |
| |----------------| |
| | Drag files here| |
| |----------------| |
| |
| |
--------------------------------------

关于javascript - 如何在浏览器中更改 "File Upload"对话框的标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19944430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com