Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions 10번/10.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div class="calculate">
<input id="userPick" type="number" />
<button class="times">곱하기2</button>
</div>
<script src="10.js"></script>
</body>
</html> -->

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<button class="btn">prompt 창 띄우기</button>

<script src="10.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions 10번/10.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// document.querySelector(".times").addEventListener("click", function () {
// let inputElement = document.querySelector("#userPick");
// let result = inputElement * 2;
// alert(result);
// });

document.querySelector(".btn").addEventListener("click", function () {
let textContents = prompt("숫자를 입력하세요.", "");
let result = textContents * 2;
alert(result);
});
13 changes: 13 additions & 0 deletions 11번/11.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div class="date">시간에 따른 인사말을 콘솔에서 확인바랍니다.</div>

<script src="11.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions 11번/11.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const currentTime = new Date();

const currentHour = currentTime.getHours();

if (currentHour < 10) {
console.log("Good morning");
} else if (currentHour >= 10 && currentHour < 18) {
console.log("Good afternoon");
} else {
console.log("Good evening");
}
12 changes: 12 additions & 0 deletions 1번/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@
- inline (인라인) 태그와 block (블록) 태그의 차이점을 찾아오시면 됩니다.

(여기에 작성)

-div
박스 형태로 영역 설정
가로 폭을 전부 차지하고 폭과 넓이를 지정할 수 있다.
줄바꿈을 자동으로 한다.

-span
줄 단위로 영역이 설정
태그 안의 내용만큼만 차지하고 폭과 넓이를 지정할 수 없다.
줄바꿈이 없고 문장 중간에 들어갈 수 있다.

span은 한 라인에 여러 요소를 표현하기 위해 사용하고, div와 span은 table 태그 대신에 구조를 만들 때 사용할 수 있다.
12 changes: 12 additions & 0 deletions 2번/2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.box {
border: 1px solid red;
width: 100px;
height: 100px;
box-sizing: border-box;
float: left;
}

.bigBox {
width: 90%;
margin: 0px 0px;
}
16 changes: 16 additions & 0 deletions 2번/2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>과제 2번</title>
<link rel="stylesheet" href="2.css" />
</head>
<body>
<div class="bigBox">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</body>
</html>
15 changes: 15 additions & 0 deletions 3번/3.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.box {
border: 1px solid red;
width: 100px;
height: 100px;
box-sizing: border-box;
float: left;
padding: 50px;
}

.bigBox {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
16 changes: 16 additions & 0 deletions 3번/3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>과제 2번</title>
<link rel="stylesheet" href="3.css" />
</head>
<body>
<div class="bigBox">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions 4번/4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.querySelector(".btn");
1 change: 1 addition & 0 deletions 5번/5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.querySelector("#heading");
12 changes: 12 additions & 0 deletions 6번/6.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<h1 id="heading"></h1>
<script src="6.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions 6번/6.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.querySelector("#heading").innerHTML = "제목입니다.";
18 changes: 16 additions & 2 deletions 7번/7.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
<img width="400px" height="300px"
src="https://grownbetter-prod-user-storage-upload-001.s3.amazonaws.com/program_images/b6cc165e-e7d0-4244-b78d-fa83c49fe306" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<img
width="400px"
height="300px"
src="https://grownbetter-prod-user-storage-upload-001.s3.amazonaws.com/program_images/b6cc165e-e7d0-4244-b78d-fa83c49fe306"
/>
<script src="7.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions 7번/7.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.querySelector("img").setAttribute("alt", "개발자");
14 changes: 13 additions & 1 deletion 8번/8.html
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
<button class="btn">prompt 창 띄우기</button>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<button class="btn">prompt 창 띄우기</button>

<script src="8.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions 8번/8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
document.querySelector(".btn").addEventListener("click", function () {
let textContents = prompt("아무거나 입력하세요.", "");
alert(textContents);
});
13 changes: 13 additions & 0 deletions 9번/9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>콘솔 창 띄우기</title>
</head>
<body>
<h1>콘솔 창 확인</h1>

<script src="9.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions 9번/9.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("안녕하세요.");