开发者

HTML upload file without using browse button

Can you make the HTML input file typeable? Instead of requiring to hit browse?开发者_C百科


I can't necessarily speak for every browser in existence, but for every one that I'm aware of you can not without a browser add-on (flash, silverlight, etc.). This is a security feature to prevent a malicious web-site from "stealing" files from your local system with clever scripts.


Not that I know of.

You can drag a file onto/into the input.

But if it was type-able you could technically get any file off their machine without them knowing.


This is a decision made by developers of browsers. Some make the fields manually editable, some only let you use the dialog. (It is worth noting that in Chrome/Mac (for instance), while the field itself isn't editable, you can type in the dialogue box).

You can't change this as a page author.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜