코딩/1-JavaScript

태그6_개념_값변경의종류

tree0505 2025. 5. 21. 15:23
반응형

태그6_개념_값변경의종류

  • 안에 찾는 명령어가 4개 있다. 
    •  (1) innerText : 사용자에게 보여지는 텍스트만 가져옴
                  (2) innerHTML : html 전체를 다 가져옴
                  (3) textContent : 숨겨진 텍스트까지 포함해서 텍스트만 모두 다 가져옴
                  (4) value : <select>, <input>태그의 값을 가져옴

_01_innerText1.html


_02_innerText2.html


_03_innerHTML1.html


_03_innerHTML2.html


_04_textContent.html


  • 프론트엔드
  • 디자이너들이 만든 수많은 태그들중 원하는 것을 규칙 찾아서.
  • 이것을 바꾸는것  

_05_value1.html


_06_value2.html


문제

_01_innerText1.html


_02_innerText2.html


_03_innerHTML1.html


_03_innerHTML2.html


_04_textContent.html


_05_value1.html


_06_value2.html


 

반응형