How do I submit a “file” input without submit button using JavaScript?

前端 未结 5 1627
栀梦
栀梦 2020-12-29 02:27

There is a way to automatically submit a form without clicking to a \"submit\" button?

I have a form with one \"file\" input. I would submit the form after the user

5条回答
  •  情话喂你
    2020-12-29 03:10

    I'm not sure what the restrictions are with doing this in an HTML form.

    You can, however, do it with Flash. Gmail does it - when I click "Attach a file", I get prompted with a file browse dialog, and when I OK that dialog the upload begins immediately, and also gives me a progress bar.

    Googling for "Flash uploader" will give you many options, but I don't have experience with any of them.

提交回复
热议问题