본문 바로가기
개발자로 가는 길(국비지원과정)/3.HTML,CSS,JavaScript, jQuery

[복습 Day19] 자바스크립트 마무리, Spring 시작, IntelliJ설치

by 레아Leah 2022. 1. 26.
반응형
<addEventListener>
 
전달인자로("발생시킬 이벤트", 함수)
txt.addEventListener("keyup", count);

 

 

<접근된 요소의 css, style 수정 가능>

function count(){
            let txt = document.getElementById("text");
            let cnt = txt.value.length;

            if(cnt >= 30){
                document.getElementById("target").style.color="red";
            }else if(cnt < 30){
                document.getElementById("target").style.color="black";
            }
            document.getElementById("target").innerHTML = `현재 글자수 : ${cnt}`;
        }

 

 

<Spring>

: 웹 서버를 개발하기 위한 프레임워크 

: 클라이언트 - 서버 - oracle (웹상에서 정보를 요청하는 프로그램) 

: 웹상에서 클라이언트가 요청한 서비스에 대해 응답하는 프로그램 

 

환경설정 

1) IDE 설치 : Eclipse, Spring tool suite 무료, IntelliJ(유료, 무료) 

Was(Tomcat) 

 

2) start.spring.io에서 필요한 디펜던시 추가(Dependency) 

Spring Web 

Lombok 

 

 

resources : 

-정적파일:

static (css, js, image)

timeplates(html) 

 

Controller : 사용자의 요청을 받는 자바 파일 

첫요청 http://localhost:8080(엔터) 

 

th:text ==> 글자처리 

아래의 것을 적어줘야함. 근데 왜 쓰는거지? 

<html xmlns:th="http://www.thymeleaf.org">
반응형