Automatically Selecting File and Submitting, Javascript

前端 未结 3 1012
攒了一身酷
攒了一身酷 2021-01-28 21:08

So I am trying to programmatically browse and I want to upload a file to an input tag with the type of file.

How would I go about this? I don\'t want the user to have to

3条回答
  •  旧时难觅i
    2021-01-28 21:21

    This is not possible. For , the value attribute of the input element is READONLY with Javascript. Otherwise, that would be a large security hole.

提交回复
热议问题