Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Fire Event on File Select</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ $("#myInput").change(function(){ alert("A file has been selected."); }); }); </script> </head> <body> <form> <input type="file" id="myInput"> </form> </body> </html>