[개발일지]
- 스파르타코딩클럽 웹플러스 이어서 수강
[오늘학습]
- 부트스트랩으로 사진 업로드 구현하기
- 사진업로드를 할 수 있는 함수 라이브러리 가져오기
<head> 영역에 붙여주자. 대충 <title> 아래 정도
<script src="https://cdn.jsdelivr.net/npm/bs-custom-file-input/dist/bs-custom-file-input.js"></script>
<!-- 부트스트랩 만든 사람들이 만든 파일 업로드 라이버리 불러오기 -->
- 웹페이지 열리자 마자 실행 되도록, $(document).ready(function () { } 안에 해당 함수 넣어주기.
$(document).ready(function () {
bsCustomFileInput.init() // 파일을 선택 했을 때 파일 명이 보이도록 하는 함수 라이브러리 불러오기
listing()
})
- html 로 해당 폼 만들어 주기 (부트스트랩에서 'file browser' 로 검색해서 가져오자)
<div class="custom-file">
<input type="file" class="custom-file-input" id="customFile">
<label class="custom-file-label" for="customFile">사진 선택하기</label>
</div>
- 다음은 토요일 수업으로 이어서 작성