728x90
구현테스트
구현 테스트 답안 코드를 보면서 해석을 해봤는데 처음 보는 코드들이 몇 개 있어서 그 부분들을 정리했다.
답안 코드를 처음부터 주석들을 계속 달면서 이해하려고 노력하고 있다.😅
(처음부터 끝까지 주석을 달면서 해석한 코드는 git에 따로 올려뒀다..!!)
modal
// javascript
$('#articleModal').modal('show');
제목을 눌렀을 때 뜨는 작은 창을 어떻게 해야할지 몰라서 alert로 띄웠었는데 모달을 띄우는 것이었다.
http://bootstrapk.com/javascript/
$inc
# python
db.article.update_one({'idx': int(idx)}, {'$inc': {'read_count': 1}})
update에서 $set은 필드 추가 및 필드 값 수정을 말하고 $inc는 게시글 조회수 증가 같은 것을 할 때 사용
https://loveiskey.tistory.com/135
hidden
<!-- html -->
<input id="post-idx" class="form-control" placeholder="" hidden>
<input type=“hidden”>은 사용자에게는 보이지 않는 숨겨진 입력 필드를 정의한다.
http://tcpschool.com/html-input-types/hidden
.html
// javascript
$("#cards-box").html("");
HTML 태그를 포함하여 선택한 요소 안의 내용을 가져온다.
https://www.codingfactory.net/10324
728x90