开发者

HTML upload file without using browse button

开发者 https://www.devze.com 2023-04-06 05:48 出处:网络
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 wi

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

精彩评论

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