
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
이건 수업의 내용은 아니고
2주차 숙제를 진행하다가 추가로 응원 남기기 버튼을 누르면 닉네임과 응원댓글이 나오도록 스크립트를 작성했는데
[object HTMLTextAreaElement] 라는 내용이 뜨네요. 혹시 이 내용도 알려주실 수 있을까요?

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css2?family=Jua&display=swap" rel="stylesheet">
<title>스파르타코딩클럽 | 부트스트랩 연습하기</title>
<style>
*{
font-family: 'Jua', sans-serif;
}
.mytitle {
max-width: 500px;
width:95%;
height: 450px;
margin: 20px auto 0px auto;
color: white;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: url("https://img.gqkorea.co.kr/gq/2022/08/style_63073140eea70.jpg");
background-size: cover;
background-position: center;
border-radius: 10px;
padding-top: 40px;
}
.mypost {
max-width: 500px;
width: 95%;
margin: 20px auto 30px auto;
box-shadow: 0px 0px 3px 0px gray;
padding: 20px;
}
.mybtn{
margin-top: 10px;
}
.form-control{
height: 50px;
}
.card {
max-width: 500px;
width: 95%;
margin: 10px auto 10px auto;
}
.temp {
color: blue;
}
</style>
<script>
$('#temp').empty()
$(document).ready(function () {
$.ajax({
type: "GET",
url: "http://spartacodingclub.shop/sparta_api/weather/busan",
data: {},
success: function (response) {
let temp2 = response['temp']
let temp_html = ``
if(temp < 0) {
temp_html = `<span id ="temp">${temp2}</span>`
} else {
temp_html = `<span>${temp2}</span>`
}
$('#temp').append(temp_html)
}
})
});
function q1() {
let txt = $('#comment').val()
let name = $('#name').val()
let temp_html = `<div class="card">
<div class="card-body">
<blockquote class="blockquote mb-0">
<p>${comment}</p>
<footer class="blockquote-footer"><cite title="Source Title">${name}</cite></footer>
</blockquote>
</div>
</div>`
$('#cards_group').prepend(temp_html)
}
</script>
</head>
<body>
<div class="mytitle">
<h1>아이유 팬명록</h1>
<p>현재기온 : <span id ="temp"></span>도 </p>
</div>
<div class="mypost">
<div class="movieurl mb-3">
<input type="text" class="form-control" id="name" placeholder="닉네임">
</div>
<div class="form-floating">
<textarea class="form-control" placeholder="Leave a comment here" id="comment"
style="height: 100px"></textarea>
<label for="comment">응원댓글</label>
<div class="mybtn">
<button type="button" class="btn btn-dark" onclick="q1()">응원 남기기</button>
</div>
</div>
</div>
<div id = "cards_group">
</div>
</body>
</html>
