실시간 Push 데이타 적용(Index.HTML)

<div id="hiddenstockcode" hidden-data-stock-code=""></div>
// 데이터 입력하기
const stockcodeelement = document.getElementById("hiddenstockcode");
stockcodeelement.setAttribute("hidden-data-stock-code", dataReal.stockCode);
// HTML 요소 가져오기, HTML에 저장된 데이터 읽기
const stockcodeelement = document.getElementById("hiddenstockcode");
const storedstockcode = stockcodeelement.getAttribute("hidden-data-stock-code");
if(dataObject.stockCode === storedstockcode) {}
else {}

실시간 Push 데이타 적용)
화면에 보이는 종목코드에 해당되는지를 판단해서, 맞으면 업데이트한다.

index.html
0.05MB

 

+ Recent posts