This page contains some examples of what JavaScript can do.
이 페이지는 자바스크립트가 무엇을 할 수 있는지에 대한 조금의 예제를 포함한다.
JavaScript Can Change HTML Content
One of many JavaScript HTML methods is getElementById().
This example uses the method to "find" an HTML element (with id="demo") and changes the element content (innerHTML) to "Hello JavaScript":
자바스크립트는 html 문서를 변경할 수 있다.
많은 자바스크립트 html 메소드 중 하나는 getElementById이다
이 예제는 html 요소를 찾기 위해 사용한다.
그리고 요소의 내용을 "Hello JavaScript"로 수정한다.
JavaScript accepts both double and single quotes:
자바스크립트는 더블과 싱글 쿼트를 모두 받아드린다.
JavaScript Can Change HTML Attribute Values
In this example JavaScript changes the value of the src (source) attribute of an <img> tag:
자바스크립트는 html의 속성 값을 변경할 수 있다.
이 예제에서 자바스크립트는 img 태그의 src 속성의 값을 수정한다.
JavaScript Can Change HTML Styles (CSS)
Changing the style of an HTML element, is a variant of changing an HTML attribute:
자바스크립트는 html style을 수정할 수 있다.
html의 스타일을 바꾸는 것은 html의 속성을 바꾸는 것의 변형이다.
'영어공부' 카테고리의 다른 글
JavaScript Output (0) | 2020.01.23 |
---|---|
JavaScript Where To (0) | 2020.01.23 |
JavaScript Tutorial (0) | 2020.01.22 |
CSS Specificity (0) | 2020.01.21 |
CSS Counters (0) | 2020.01.21 |