本文介绍了如何重命名HTML“浏览”输入类型=文件的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将浏览按钮重命名为选择文件?例如:

 <输入类型=文件名称=浏览> 


解决方案

该按钮不称为浏览按钮 - 这只是你的浏览器给它的名字。不管他们喜欢,浏览器都可以自由地实现文件上传控制。例如,在Safari中,它被称为选择文件,它与您可能使用的任何对象相反。



您可以实现上传的自定义外观使用进行控制,但这不仅仅是改变按钮的文本。 / p>

How to rename the browse button as "Select the file"? E.g.:

<input type=file name=browse >
解决方案

The button isn't called the "browse button" — that's just the name your browser gives for it. Browsers are free to implement the file upload control however they like. In Safari, for example, it's called "Choose File" and it's on the opposite side of whatever you're probably using.

You can implement a custom look for the upload control using the technique outlined on QuirksMode, but that goes beyond just changing the button's text.

这篇关于如何重命名HTML“浏览”输入类型=文件的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 22:51