Answers for "get file name javascript from input"

3

get filename from url js

var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1);
Posted by: Guest on October-29-2020
0

get uploaded file name in js

$('input[type="file"]').change(function(e) {
        var fileName = e.target.files[0].name;
        $(e.target).parent('div').find('.form-file-text').html(fileName)
  		// Inside find search element where the name should display (by Id Or Class)
});
Posted by: Guest on November-11-2020

Code answers related to "get file name javascript from input"

Code answers related to "Javascript"

Browse Popular Code Answers by Language