开发者

Pasting multiple files directly into a webpage with Input tag

I am rookie at web programming and I would like to kno开发者_JS百科w if the below is possible.

I want to be able to directly paste files into a webpage, which has the input tag, similar to the Outlook interface. I have seen posts which talk about drag and drop, but I wanted to know if this can be implemented.

I was thinking if this could be achieved via a Greasemonkey script/Firefox add on. I was thinking if we could somehow capture the paste event and check if the clipboard contains files, if it does we could probably use the location of the files and provide that as an input to the input element.

Do let me know if this can be done.

Thanks,


You can't use Javascript to update the filepath of a file input element, due to potential security issues.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜