开发者

HTML File Upload - Longer textfield for selected filepath?

开发者 https://www.devze.com 2023-02-23 07:25 出处:网络
Say I have a HTML page that looks like this: That was created with this code: <body> <input type=\"file\" name=\"uploadFile\" id=\"uploadFile\" />

Say I have a HTML page that looks like this:

HTML File Upload - Longer textfield for selected filepath?

That was created with this code:

 <body>
<input type="file" name="uploadFile" id="uploadFile" />
</body>

Is there some way to make the textfield for the file path longer开发者_高级运维, so that I can read the entire path?

I've seen solutions such as this, but it seems waaay to advanced for my needs.


A width attribute stretches the field for me in Chrome and IE8.

<input type="file" style="width: 100%">

It doesn't work in FF4, though.

JSFiddle: http://jsfiddle.net/GZAEc/


add the size="x" attribute to your input tag.

0

精彩评论

暂无评论...
验证码 换一张
取 消