alternate to onchange event in <input type='file' />

前端 未结 8 1969
青春惊慌失措
青春惊慌失措 2020-12-10 04:04

Seems really a simple thing but can\'t figure it out. I\'ve been using the onchange event on element and it works well. Once the user browses and selects a file, I get the

8条回答
  •  情深已故
    2020-12-10 04:25

    You can just remove the input and create an identical one with javascript - the new one will be empty.

    (edited answer to be straight to the point, comments are irrelevant now)

提交回复
热议问题