How do I call a JavaScript function after selecting a file from the Select File window and closing it?

前端 未结 6 1368
無奈伤痛
無奈伤痛 2020-12-14 15:10

I have a file input element


How do I call a JavaScript function after selecting a file from the d

6条回答
  •  我在风中等你
    2020-12-14 15:32

    This tested code helps you:

    $("body").on('change', 'input#fileid',function(){
        alert($(this).val());});
    

提交回复
热议问题