2019/JavaScript 19

JS create Element

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 //createElement : 태그 이름 //createTextNode : 태그 내용 입력.... 태그 속성..?정확한 명칭은 모르게음..ㅠ //setAttribute : 태그 내부에 입력 window.onload=function(){ let h=document.createElement('h1'); let txt=document.createTextNode('hello'); h.appendChild(txt); //태그에 hello 입력 let h2=document.createElement('h2'); let txt2=document.createTextNode('hello2..

2019/JavaScript 2019.12.09