Javascript (35) 썸네일형 리스트형 DOM 트리에서 DOM 객체 찾기.html See the Pen RwPyzdW by MoonSeonhyeon (@Seonhyeon) on CodePen. document 객체.html 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 29 30 31 32 33 document 객체 주요 요소값 var text = "문서 로딩 중일 때 readyState = " + document.readyState + "\n"; 네이버 이곳은 div 영역입니다. function printProperties() { document.getElementById("input").focus(); text+="1.location = "+ document.location + "\n";//많이 사용 text+="2.URL = "+ document.URL + "\n"; text+="3.title = "+ document.title +.. this 객체를 자신을 가리키는 키워드 (DOM 객체에서 객체 자신을 가리키는 용도로 사용) See the Pen qBdxyeN by MoonSeonhyeon (@Seonhyeon) on CodePen. innerHTML innerHTML을 이용하여 html 콘텐츠 동적 변경 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Document function change() { var p =document.getElementById("firstP"); p.innerHTML = "나의 강아지" target="_blank" rel="noopener">puppy.png'>강아지"; } 여기에 클릭하세요. http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter http://colorscripter.com/info#e" target="_blank" s.. CSS 동적변경 getElementById() See the Pen WNvMopx by MoonSeonhyeon (@Seonhyeon) on CodePen. HTML 태그 요소 5가지! See the Pen ZEGrBBJ by MoonSeonhyeon (@Seonhyeon) on CodePen. 통장 See the Pen rNVJMbm by MoonSeonhyeon (@Seonhyeon) on CodePen. String 객체 사용하기 charAt() concat() slice() toUpperCase() replace() .split() 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Document String 객체 사용하기 var a = new String("Boys and Girls"); var b = "!!";//String 만 유일하게 new 없이 사용가능 //문자열 - 문자(한개의 단어) document.writeln(a.charAt(0)+" "); //concat메소드는 가변인수.. 이전 1 2 3 4 5 다음