1일1커밋 (2) 썸네일형 리스트형 [Udemy - 100일 코딩 챌린지] 2/15 개발공부일지 Java Script selector(선택자) a tag 링크 수정을 html에서 말고 javascript에서도 가능하다. nest 관계를 이해하여 웹사이트 내 특정 요소를 선택할 수 있게 된다. nested 혹은children 혹은 parent! document.body.children[1].children[0].href = 'https://google.com'; 이 때 head tag에 있는 script의 코드를 먼저 실행시켜서 위와 같은 결과를 console창에서 확인할 수 있다. 위와 같은 상황을 방지하기 위해 script tag 안에 defer attribute를 작성하여 body tag의 코드를 먼저 실행하고 난 뒤 script의 외부 코드를 읽도록 할 수 있다. document의 method를 사용하여 element를 선택할 수 있다. .. [Udemy - 100일 코딩 챌린지] 1/31 개발공부일지 (input type) input type="" 많다. 그리고 +a text email number password date ( 말고 별개 element 이다) radio (n지선다용) select (n지선다용, input element 아님) checkbox(input element 아님) value attribute 는 , checkbox, select에서 특정 값을 선택했을 때, 나중에 DB 에서 저장할 값을 지정한다. 끝! 이전 1 다음