<script src="path" />
var = variable 식별자
document = 문서 자체의 개체
기초적인 변수
prompt(); - 사용자의 입력 값을 받기 위해 가장 쉽게 이용하는 함수.
alert(); - 간단한 알림 내용을 출력하는 함수.
document.write(내용) - 결과 값을 브라우저 화면에 출력하기 위하는 함수.
console.log() - 콘솔(웹 브라우저나 프로그램 등)에 출력.
예시 var a = 10; console.log(a) 하면 console에 10 출력.
변수와 자료형 그리고 연산자
var
naming format -> 문자로 시작하는 경우가 주임. 밑줄, $로 시작하는 경우도 있음.
자료형 변수의 종류

Array 배열
Java와 달리 타입에 개의치 않는다는 특징이 있음.
Window.load() event
The load event is fired when the whole page has loaded, including all dependent resources such as stylesheets and images.
'JavaScript' 카테고리의 다른 글
| Object (0) | 2022.03.17 |
|---|---|
| console.log (console에 프린팅) (0) | 2022.03.17 |
| 브라우저에서 흔히 일어나는 Event 정리 (0) | 2021.07.30 |
| jQuery (0) | 2021.07.27 |