always_here

지식을 공유하고 함께 성장하는 엔지니어 as_always 입니다

AS_ALWAYS

웹(Web)/자바스크립트

4. 세션 선택

nauung_always 2021. 3. 1. 15:22
728x90

4. 세션 선택 CSS :: as_always (tistory.com)

 

4. 세션 선택 CSS

body {     background-color:#0c3268;     color:rgb(243, 243, 243); } p {     margin-top:80px;     font-size:2em;     font-weight:700;     text-align: center;     tex..

always-here.tistory.com

<!DOCTYPE html>

<html lang="ko">

<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>세션 선택</title>

    <link rel="stylesheet" href="css/switch.css">

</head>

<body>

    <script>

        var session = prompt("관심 세션을 선택해 주세요. 1-마케팅, 2-개발, 3-디자인""1");

        switch(session){

            case "1":document.write("<p>마케팅 세션은 <strong>201호</strong> 에서 진행됩니다.</p>");

            break;

            case "2":document.write("<p>개발 세션은 <strong>203호</strong> 에서 진행됩니다.</p>");

            break;

            case "3":document.write("<p>디자인 세션은 <strong>205호</strong> 에서 진행됩니다.</p>");

            break;

        default:alert("잘못 입력했습니다.");

        }

    </script>

</body>

</html>

728x90

'웹(Web) > 자바스크립트' 카테고리의 다른 글

6. 함수와 이벤트  (0) 2021.03.13
5. 구구단  (0) 2021.03.08
3. 3의배수 확인  (0) 2021.03.01
2. 나이계산하기  (0) 2021.03.01
1. 안녕하세요  (0) 2021.03.01