SetUp
[Setup] 제이쿼리 / jQuery 라이브러리 연동 / Download 방식 / 네트워크 전송(CDN, Content Delivery Network 방식)
bkuk
2022. 12. 2. 12:42
- 다운로드 방식: 제이쿼리 라이브러리 파일을 직접 내려바아 HTML에 불러오는 방식
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

다운로드 방식 설명


<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="./js/jquery.js"></script>
<script type = "text/javascript">
- 네트워크 전송 방식: 온라인에서 제공하는 제이쿼리 라이브러리 파일 네트워크를 통해 HTML에 불러오는 방식
두 방식의 차이점은
다운로드 방식은 네트워크 상태와 상관없이 언제든 개발할 수 있다는 장점이 있습니다.
간단히 테스트할 목적이라면 네트워크 전송 방식을 추천합니다.


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>