如何重命名HTML“浏览”输入类型=文件的按钮? [英] How to rename HTML "browse" button of an input type=file?

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

问题描述

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

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


解决方案

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



您可以实现上传的自定义外观使用 QuirksMode概述的技术进行控制,但这不仅仅是改变按钮的文本。 / 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“浏览”输入类型=文件的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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