69일차 2023-06-15
Spring
jQuery
게시판 만들기
페이징 처리
인터셉터로 로그인의 id 값보내는 걸 간소화
jQuery
JQuery란?
-오픈소스 자바스크립트 라이브러리
-CSS에서사용되는선택기/선택자(Selector) 개념으로DOM의멤버에접근
-웹에서 자주 사용하는 기능의 간편화
-메서드 체인방식에 따른 효율적인 코딩가능
-크로스 브라우저 지원
-공식사이트: jQuery소스 및 문서 제공
다운로드: http://jquery.com
jQuery
What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
jquery.com
-설치
웹사이트에 주로/js/ 폴더에 최신 버전을 다운로드
-배포용
jquery-1.버전.min.js : 실행 가능한 최소크기의 버전
-개발용
jquery-1.버전-vsdoc.js : Visual Studio 인텔리센스지원
※ 2012년 현재 최신 버전은 1.8.1
CDN주소 위치: core 선택->download
-> Google CDN->
이 3개 중에 3.x스니펫 선택
-jQueryUI 사이트: 화려한 UI관련 플러그인 제공
http://jqueryui.com/
jQuery UI
jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQue
jqueryui.com
우리가 사용하는건 다운로드해서 src 상대주소로 사용 or CDN방식으로 사용가능
방법 3가지 개념
[jQuery의 진입점]
[1]
$(document).ready(
function(){//무명 메서드(이름이 없는 메서드)
//여기서 코딩-자바스크립트와 jQuery혼합
}
);
[2]
$().ready(
function(){//무명 메서드
//여기서 코딩
}
);
[3]
$(
function(){//무명 메서드
//여기서 코딩
}
);
cdn방식
body부분
브라우저
바닐라 자바스크립트로 구현
제이쿼리로 구현
진입점-방법1
진입점-방법2
진입점-방법3
진입점-방법4