In JavaScript is it possible to launch a file browser dialog programmatically?

前端 未结 5 1553
耶瑟儿~
耶瑟儿~ 2020-12-15 23:18

Instead of using the tag I\'d like to have a button that launches a file browser dialog.

My first thought was to have a hidd

5条回答
  •  攒了一身酷
    2020-12-16 00:03

    Instead of trying to hack the browser's file input control, I'd suggest using a flash based file uploader like SWFUpload. I've started using this in one of my projects and have been VERY pleased with it.

    You get javascript callbacks and you can do anything you want for a UI (the flash is just the uploading functionality).

提交回复
热议问题