JDK설치
Apache tomcat 설치
이클립스 설치
이클립스 환경 설정(폰트)
Window -> Preferences -> General -> Appearance -> Colors
and Fonts
이클립스 환경 설정(인코딩)
Window -> Preferences -> General -> Content Types
이클립스 환경 설정(웹브라우저 설정)
Window -> Preferences -> General -> Web Browser
이클립스 환경 설정(서버 설정)
Window -> Preferences -> Server -> Runtime Environment
프로젝트 만들기
File -> New -> Dynamic Web Project
jQuery 라이브러리 다운로드
jQuery를 통해 코드 간편화
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" ></script>
<script>
function set_h1(){
/*
var h1 = document.getElementsByTagName("h1");
var str = h1[0].firstChild;
str.nodeValue = "Javescript로 문자열 변경";
*/
$("h1").text("jQuery로 문자열 변경");
}
function get_li(){
/*
var li = document.getElementsByTagName("li");
var result = document.getElementById("result");
for (var idx in li){
var str = li[idx].firstChild;
result.innerHTML += str.nodeValue + "<br/>";
*/
$("li").each(function(idx, obj){
var str = $(obj).text();
$("#result").append(str + "<br/>");
});
}
</script>
</head>
<body>
<h1>JavaScript 실습</h1>
<button onClick="set_h1()">h1 태그문자열 변경</button>
<br/>
<ul>
<li>문자열1</li>
<li>문자열2</li>
<li>문자열3</li>
</ul>
<button onClick="get_li()">li 태그 문자열 가져오기</button>
<div id="result"></div>
</body>
</html>
오늘은 간단히 jQuery를 사용하기 위한 환경을 설정하고 간단하게 어떻게 사용할 수 있는지만 알아보았다. 아직은 사용하는 방법이 쉽지 않아보이지만 제대로만 사용하면 코드를 간략화시켜 강력한 도구로 사용할 수 있을 것 같다.
내일부터 본격적으로 사용하는 법과 실습, 예제를 해볼텐데 아직 부족한 자바스크립트 부분을 좀 더 익숙하게 만들어놔야 할 것 같다.
오늘 기업이 원하는 직업적 스킬들이 무엇인가에 대해 좀 알아볼 수 있었는데 내가 공부하고 싶은 방향과 맞는 부분이 있어서 그쪽을 따로 공부해놔야 할 것 같다.