changing the name of type="file" input tag?
i have an input tag...
<input type="file" name="upload">
for browsing it makes the button vith value "browse"
(in mozilla)
the question is: how can i change the name of that button? i want it to have the name "select"
instead o开发者_如何学Cf "browse"
.
Thanks
Unfortunately the button text of an <input type="file">
is controlled by the browser, and cannot be changed, as far as I know.
In general, fancy file uploaders are often flash-based. However, if you are ready for a challenge, you may want to check out the following QuirksMode article for a few CSS + JavaScript tricks in this direction:
- QuirksMode: Styling an input type="file"
I haven't tried, but can you set the input to display:none and then use background images?
精彩评论