how to fire event on file select

前端 未结 7 1062
遥遥无期
遥遥无期 2020-12-02 15:25

I\'ve a form as

7条回答
  •  庸人自扰
    2020-12-02 15:46

    Do whatever you want to do after the file loads successfully.just after the completion of your file processing set the value of file control to blank string.so the .change() will always be called even the file name changes or not. like for example you can do this thing and worked for me like charm

      $('#myFile').change(function () {
        LoadFile("myFile");//function to do processing of file.
        $('#myFile').val('');// set the value to empty of myfile control.
        });
    

提交回复
热议问题