Index

1. Javascript의 기초

1.1 Javascript란?

자바스크립트는 사용자의 이벤트를 받고 내장 객체들을 이용한 CSS나 태그의 스타일 관련 속성, 날짜, 텍스트 등을 조작 할 수 있습니다.

.box{
	height: 300px;
	width: 300px;
	background-color: blue;
	transition: all 2s;
}
<!-- javascript 소개 -->
<h1>자바스크립트로는 어떤 것을 할 수 있나요?<h1>
<button type="button"
onclick="document.getElementById('demoOne').innerHTML = Date()">
Click me (One)</button>

<button type="button"
onclick="document.getElementById('demoTwo').innerHTML = 'hello world'">
Click me (Two)</button>

<button type="button"
onclick="document.getElementById('demoThree').style.backgroundColor = 'red'">
Click me (Three)</button>

<p id="demoOne"></p>
<p id="demoTwo"></p>
<p class="box" id="demoThree"></p>
<h1 id='title'>Hello World</h1>
<script>
  // <https://ko.javascript.info/> 소개
  // <https://www.w3schools.com/> 소개

  // 자바스크립트로 출력하는 방법
  // let age = 10; //지금은 다루지 않습니다.
  // const pi = 3.141592; // 지금은 다루지 않습니다.
  var name = '사용자';
  var age = 20;

  document.getElementById('title').innerHTML = 'Welcome to JS100제';
  document.write(20 + 20);
  window.alert(name);
  console.log(age);
  // 한 줄 주석
  /* 주석
  입니다. */
</script>

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2180099c-902f-4828-8340-fd5818fe300a/Untitled.png