jQuery w3schools 한글판 강좌14 - jQuery Selectors - Functions in a Separate File 정보
jQuery jQuery w3schools 한글판 강좌14 - jQuery Selectors - Functions in a Separate File본문
jQuery w3schools 한글판 강좌14 - jQuery Selectors - 분리된 파일에서의 함수
여러분의 웹사이트에 많은 페이지가 있을때, jQuery함수가 관리하기 편하기 원한다면, jQuery함수를 다른 .js 파일에 위치시킬수 있습니다.
우리가 이 강좌에서 jQuery를 시연해보일때, 그 함수들은 <head>섹션에 바로 추가해서 시연해보여주지만,
때로는 그 함수들을 분리된 다른 파일에 위치시키는 것이 선호됩니다.
아래와 같이 말이죠(src 특성(attribute)을 .js 파일로 참조되게 사용하십시오)
Example
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js">
</script>
<script src="my_jquery_functions.js"></script>
</head>
추천
0
0
댓글 0개