Story/html/css
bootstrap 4 file input doesn't show the file name 부트스트랩에서 파일 첨부시 파일명이 안보일때
Stdio
2020. 6. 9. 17:17
반응형
기본으로 되지는 않고 jquery 의 도움을 써서 해결이 되었다.
$("input[type='file']").on('change',function(){
$(this).next('.custom-file-label').html(event.target.files[0].name);
});
<div class="custom-file">
<input type="file" name="user_file" class="custom-file-input">
<label class="custom-file-label" for="inputGroupFile01">Choose file</label>
</div>
반응형