How to rename HTML “browse” button of an input type=file?

前端 未结 10 1546
轻奢々
轻奢々 2020-11-27 15:01

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


10条回答
  •  没有蜡笔的小新
    2020-11-27 15:57

    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.

提交回复
热议问题