23.01.05

Fromi·2023년 1월 5일
0

TIL

목록 보기
3/8
post-thumbnail

innerText

html

<p id="aaa"></p>	

js

document.getElementById("aaa").innerText = "입력"

getElementById
js-html id값이 일치하는 태그 연결
대소문자 주의...

innerText
텍스트 가져오거나 변경


JSON.parse(), JSON.stringify()

json.parse

const jsonObj = JSON.parse(jsonText);

json -> 객체

json.stringfy

const jsonStr = JSON.stringfy(jsonObj);

객체 -> json

profile
https://github.com/c2540

0개의 댓글

관련 채용 정보