How to change “Choose file” into “Browse”?

前端 未结 3 1344
-上瘾入骨i
-上瘾入骨i 2020-12-13 10:19

I want to change the default value of from “Choose file” to “Browse”. How to do that?

相关标签:
3条回答
  • 2020-12-13 10:33

    Hide it and use a other control to trigger it.

    <a href="#" onclick="document.getElementById('fileID').click(); return false;" />Browse</a>
    <input type="file" id="fileID" style="visibility: hidden;" />
    
    0 讨论(0)
  • 2020-12-13 10:43

    I created a jsFiddle to show how, you can find it here: Custom browse button

    0 讨论(0)
  • 2020-12-13 10:55

    Here is another solution; hiding file-type input field (button) and placing another regular button-type input field (button) which allows one to change its content - triggering first file button (lower one) is done with JavaScript clicking on second regular button (upper one).

    → Howto Style the Button of a input type="file" Control

    0 讨论(0)
提交回复
热议问题