실시간 환율 반영
1. <head> 안에
<script>
$(document).ready(function(){
q1();
});
function q1() {
$.ajax({
type: "GET",
url: "환율페이지",
date: {},
success: function(response){
let now_rate = response['rate'];
$('#now-rate').text(now_rate);
}
})
}
function order() {
alert('주문이 완료되었습니다!');
}
</script>
p class="rate">달러-원 환율: <span id="now-rate">00</span></p>