1. 파일명.js 생성
2. html 파일 <body></body> 맨 마지막에 아래 태그 넣기
<script src="파일명.js" charset="utf-8"></script>
3. alert 등으로 연결 잘 되어있는지 확인
'JS' 카테고리의 다른 글
JS 라이브러리_lodash, gsap, swiper (0) | 2022.06.04 |
---|---|
랜덤숫자 구하기 (0) | 2022.05.26 |
태그의 특정속성만 골라서 업데이트 _ attributes (0) | 2022.05.25 |
innerHTML VS textContent (0) | 2022.05.25 |
class 추가/삭제_classList.add/remove/toggle (0) | 2022.05.25 |