Date 메소드
See the Pen Date 메소드 by nilgi (@nilgi) on CodePen. • getFullYear() // 연도를 4자리로 표시 const y = new Date(); document.getElementById("gfy").innerHTML = y.getFullYear(); • getMonth() // 월 const m = new Date(); document.getElementById("gm").innerHTML = m.getMonth() + 1; // 자바스크립트는 0부터 시작이므로 +1 const ms_text = ["January","February","March","April","May","June","July","August","September","October","Nove..
2022. 11. 10.