...

์ ์ด์ฟผ๋ฆฌ ์ค์น
ํ๋ ์ ์ธ๊ณ์์ ๊ฐ์ฅ ๋ง์ด ์ฐ๋ ์๋ฐ์คํฌ๋ฆฝํธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น & ์ ์ฉ ๋ฐฉ๋ฒ์ ๋ํด ํฌ์คํ ํด๋ณธ๋ค.
1. ๋ก์ปฌ ๋ค์ด๋ก๋ ๋ฐฉ๋ฒ
์๋ ๋งํฌ๋ก ๋ค์ด๊ฐ jquery ํ์ผ์ ๋ค์ด๋ก๋ ํ๋ค, ์์ ์ ํ๋ก์ ํธ์ ๋ฃ์ผ๋ฉด ๋๋ค.
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



โ
๊ทธ๋ฆฌ๊ณ html์ headํ๊ทธ์์ src๋ฅผ ์ง์ ํด์ฃผ๋ฉด ๋๋ค.
<head>
<script src="./jquery-3.4.1.min.js"></script>
</head>
2. CDN์ผ๋ก ๋ถ๋ฌ์ค๋ ๋ฐฉ๋ฒ
โ์๋ ๋งํฌ์์ ์ฝ๋๋ฅผ ๋ณต์ฌํ๊ณ html์ ๋ฃ์ผ๋ฉด ๋๋ค.
jQuery CDN
The integrity and crossorigin attributes are used for Subresource Integrity (SRI) checking. This allows browsers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libr
code.jquery.com


<script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
์ ์ด์ฟผ๋ฆฌ ์ ์ฉ ์์
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<div id="test"></div>
<script>
$('#test').html('์ ์ด์ฟผ๋ฆฌ ํ
์คํธ').css('border','1px solid blue')
// ์ ์ด์ฟผ๋ฆฌ๋ ์๊ธฐ์์ ์๋ฆฌ๋จผํธ๋ฅผ ๋ฐํํ๊ธฐ ๋๋ฌธ์, ์ฒด์ด๋ ๊ธฐ๋ฒ์ด ๊ฐ๋ฅํ๋ค.
</script>
</body>
</html>
์ด ๊ธ์ด ์ข์ผ์ จ๋ค๋ฉด ๊ตฌ๋ & ์ข์์
์ฌ๋ฌ๋ถ์ ๊ตฌ๋
๊ณผ ์ข์์๋
์ ์์๊ฒ ํฐ ํ์ด ๋ฉ๋๋ค.