Skip to content Skip to sidebar Skip to footer

Input File "no File Choosen" Text Hide Using Button In Jquery Multifile

I have following input file In this file input I'm trying to remove 'No Fil

Solution 1:

You can try this

 $('#image_alt').on('click', function () {
        $('#sampleInput').click();
    });

addEventListener is the javascript way to listen for events, but you call it on a JQuery object. Give a look at JQuery.on() to manage events using JQuery.

Solution 2:

try this

<buttonid="image_alt"type="button">Select image</button><pclass="file_selected">File name</p><scripttype="text/javascript">
    $('#image_alt').on('click', function () {
        $('#sampleInput').click();
    });
    functionchangeVal(obj,cnt){
       $(cnt).text($(obj).val());
    }
</script>

Post a Comment for "Input File "no File Choosen" Text Hide Using Button In Jquery Multifile"