如何删除“未选择文件"?从类型=文件输入? [英] How to remove "no file selected" from type=file inputs?

查看:65
本文介绍了如何删除“未选择文件"?从类型=文件输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法找出任何方法来删除未选择文件"出现在文件"类型输入旁边的文本.

I can't seem to figure out any way to remove the "No file selected" text that shows up next to inputs of type "file".

你们知道如何删除此文本吗?

Do you guys know any way how to remove this text?

推荐答案

没有跨浏览器的方法.小部件的实现定义部分中包含未选择文件"文本,我不相信大多数浏览器会提供特定于浏览器的自定义方式.另一方面,当value属性为空时,您可以简单地使用CSS覆盖文本.

There is no cross-browser way to do this. The "no file selected" text is in the implementation-defined part of the widget, and I don't believe that most browsers offer much in the way of browser-specific customization. On the other hand, you could simply use CSS to cover the text with something when the value attribute is empty.

这篇关于如何删除“未选择文件"?从类型=文件输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆