
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
API에서 가져오는 temp 값과 id 값으로 지정해놓은 'temp' 가 똑같으니까 너무 햇갈리네요....
<p> 태그 span에 들어가는 아이디 값 temp 를 00.00으로 대체해서 나오게 하는 방법이 뭘까요??
</STYLE>
<script>
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
data: {},
success: function(response){
let temp = response['temp']
$('#temp').text(temp)
}
});
</script>
<body>
<div class="mytitle">
<h1>10cm 팬명록</h1>
<p>현재기온 : <span id="temp">00.00</span>도 </p>
</div>
