대구AI스쿨 2기 첫 일지

gunho-sung.log·2022년 3월 23일
0

학습한 내용

진도와 학습한 내용
1. 어제 배운 내용 리뷰
2. JS 입문
3. 구글 애널리틱스 코드 삽입

소스파일을 실행한 결과 첨부

<html>
    <body>
        <script>
            console.log(1);
            console.log(2);
            console.log(3);
        </script>

        1+1 <br>
        <script>
            document.write(1+1);
            document.write('<br>');
            document.write(Math.random());
        </script>
        <input type="button" value="Hello" onclick="alert('안녕');">
    </body>
</html>

<html>
    <body>
        <h1>Number</h1>
        <script>
            console.log(1); // 정수
            console.log(1.1); // 실수

            // Operator
            console.log(1+1); // 2
            console.log(2-1); // 1
            console.log(2*2); // 4
            console.log(4/2); // 2

            // 함수
            console.log(Math.random());
            console.log(Math.floor(1.9));
            console.log(Math.floor(Math.random()*100));

        </script>

        <h1>문자열(String)</h1>
        <script>
            console.log('Hello World');
            console.log("Hello World");
            console.log("Hello \
            World");
            console.log(`Hello 
            World`);

            console.log('Hello World'.length);
            console.log('Hell World'.replace('Hell', 'Hello'));
            console.log('Hello '+'World');
            
            console.log('1'+'1');
        </script>
    </body>
</html>코드를 입력하세요.

<!doctype html>
<html>
<head>
    <title>WEB</title>
    <meta charset="utf-8">
    <style>
        h1{
            border-bottom:10px solid red;
            padding:30px;
        }
        
        @media all and (min-width: 480px){ 
            #container{
                display:grid;
                grid-template-columns: 150px 1fr;
            }

        }
    </style>
</head>
<body>
    <h1><a href="index.html">WEB</a></h1>
    <input type="button" value="night" onclick="
        if(this.value === 'night'){
            document.querySelector('body').style.color='white';
            document.querySelector('body').style.backgroundColor='black';
            let as = document.querySelectorAll('a');
            for(let i=0; i<as.length; i++){
                as[i].style.color='white';
            }
            this.value = 'day';
        } else {
            document.querySelector('body').style.color='black';
            document.querySelector('body').style.backgroundColor='white';
            let as = document.querySelectorAll('a');
            for(let i=0; i<as.length; i++){
                as[i].style.color='black';
            }
            this.value = 'night';
        }
    ">
    <div id="container">
        <ol>  
            <li><a href="1.html">html</a></li>
            <li><a href="2.html">css</a></li>
            <li><a href="3.html">JavaScript</a></li>
        </ol>
        <div>
            <h2>Welcome!</h2> 
            Hello <a href="http://info.cern.ch/hypertext/WWW/TheProject.html">WEB</a>
        </div>
    </div>


</body>
</html>

<html>
    <body>
        <h1>Variable</h1>
        <script>
            var a = 1;
            a = 2;
            console.log(a);

            let b = 1;
            b = 2;
            console.log(b);
        </script>

        <script>
            let 가격 = 10000;
            let 부가가치세율 = 0.1;
            let 부가가치세 = 가격*부가가치세율;
            console.log(부가가치세);
        </script>
    </body>
</html>

    <input type="button" value="night" onclick="
        document.querySelector('body').style.backgroundColor = 'black';
        document.querySelector('body').style.color = 'white';
    ">
    <input type="button" value="day" onclick="
    document.querySelector('body').style.backgroundColor = 'white';
    document.querySelector('body').style.color = 'black';
    ">

야간모드 코드

학습한 내용 중 어려웠던 점 또는 해결못한 것들

-없음

해결방법 작성

-없음

학습 소감

(학습을 하면서 느꼈던 점들에 대해 작성)

배운 내용들이라서 가볍게 복습하는 것으로 수업을 들었다. 이론 내용을 하시면서 주변 배경지식들도 함께 설명을 해주셔서 기초를 다시 탄탄하게? 다지는 수업이었다. 2기 코스는 마케팅 코스라서 프로그래밍에 집중된 것은 아니지만 공통 교육과정이고 웹 기술에 대한 것은 나도 필요로 하기 때문에 기초를 탄탄하게 다져야겠다 생각한다.

profile
프로그래밍 초보 입문

0개의 댓글

관련 채용 정보