Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- timepicker
- 맥 어드레스
- html #select #option #multiple
- DataGridView 직접 입력
- mosquitto.conf
- mySQL_Replication
- 공인IP
- 서버동기화
- Replication
- 데이터테이블 데이터 넣기
- pm2 확인
- listener 1883
- pm2 시작
- setInterval 정지
- pm2
- setInterval 중지
- setInterval clear
- invalid data
- DatePicker
- datagridview 직접입력
- pm2 설치
- mosquitto
- 1883
- setInterval 외부 정지
- map이 undefined가 뜰 때
- pm2 상태 확인
- AntDesign
- allow_anonymouse
- c# datagridview 데이터 넣기
- transfer
Archives
- Today
- Total
개발 노트
카카오 책검색 api 사용하기 본문
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API 연습</title>
</head>
<body>
<h1>내 사이트임 ㅎㅇ</h1>
<input id="bookName" value="" type="text">
<button id="search">검색</button>
<p></p>
<script src="https://code.jquery.com/jquery-3.6.0.js"
integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$("#search").click(function () {
$.ajax({
method: "GET",
url: "https://dapi.kakao.com/v3/search/book?target=title",
data: { query: $("#bookName").val() },
headers: {Authorization: "카카오 자기꺼 api id"}
})
.done(function (msg) {
console.log(msg.documents[0].title);
console.log(msg.documents[0].thumbnail);
$( "p" ).append( "<strong>"+msg.documents[0].title+"</strong>" );
$( "p" ).append( "<img src='"+msg.documents[0].thumbnail+"'/>" );
});
});
})
</script>
</body>
</html>
'JavaScript' 카테고리의 다른 글
Javascript - LocalStorage (0) | 2022.11.11 |
---|---|
자바스크립트 fetch,callback,promise,async 게시글 (0) | 2022.01.10 |
사칙연산 연습문제 만들기 (0) | 2022.01.07 |
사칙연산 사이트 만들기 (0) | 2022.01.05 |
투두리스트 html,css,js (0) | 2022.01.03 |