jQuery – Detecting if a file has been selected in the file input [duplicate]
You should be able to attach an event handler to the onchange event of the input and have that call a function to set the text in your span. <script type=”text/javascript”> $(function() { $(“input:file”).change(function (){ var fileName = $(this).val(); $(“.filename”).html(fileName); }); }); </script> You may want to add IDs to your input and span so … Read more