javascript (2019.11.27)

evergreendavid1118·2019년 11월 27일
0

1. web history

  • 1세대 정적인 web (HTML 위주)
    ex) 2000년도 야후 웹페이지
  • 2세대 동적인 web ( HTML + Javascript )
  • 3세대 Javascript 메인 (Single Page Application)
    HTML 태그도 자바스크립트로 동정으로 생성하는 추세
    ex) 네이버 실검, 실검 데이터는 주기적으로 바뀜, 테이블은 고정적

2. vs code install

vs code download(https://code.visualstudio.com/)
Configure Task Runner
Input shortcut (control + command + b )
하기 task runner 용 Json 작성

{
    "version": "1.0.0",
    "command": "Chrome",
    "osx": {
        "command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
    },
    "args": [
        "${file}"
    ]
}

3. vs code 설치 후 예제를 테스트

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        alert('hello javascript');
        let address;
        console.log('', address);
        address = "선릉";
        console.log(address);
    </script>
</head>
<body>
    Hello World!!
    alert("hello");
</body>
</html>

4. 크롬에서 console.log 확인

실행 후 브라우저에서 inspect 실행하여 Console 탭으로 가면 위의 코드에서 console.log로 찍은 결과 확인

코드 라인 클릭하면 해당 코드로 이동

0개의 댓글