환율 > SCRIPT

본문 바로가기

사이트 내 전체검색

뒤로가기 SCRIPT

환율

페이지 정보

작성자 관리자 작성일 20-09-18 09:40 조회 5,467 댓글 0

본문

<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <title></title>
 <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
 <script>
 $(document).ready(function(){
 $.ajax(
  {url:"https://www.koreaexim.go.kr/site/program/financial/exchangeJSON?authkey=22VMJ1JCcIFy1mvgvUSn1JCWmRkq3k2A&searchdate=20171215&data=AP01",header:'Content-Type:text/plain; charset=utf-8',
  dataType: "json",
  success: function (data) {
 
  //받아온 JSON을 테이블에 출력
  $.each(data, function (index,entry) {
    $('#tablList').append("<tr><td>" + this.cur_nm + "</td><td>" + this.cur_unit + "</td><td>" + this["kftc_deal_bas_r"] + "</td></tr>");
  });
  },
 error: function () { alert("에러발생"); }
 });

 });
 </script>

 </head>

 <body>
 <table id="tablList" border="1"></table>
 </body>
 </html>

댓글목록 0

등록된 댓글이 없습니다.

Copyright © neion.co.kr All rights reserved.
PC 버전으로 보기