jquery 시작하기

1) jquery를 사용하려면 기본적으로 jquery 링크를 걸어줍니다 (빨강색)

   jquery 페이지에서 다운 받아서 상대경로 작성하시면 됩니다. 

   저는 예제라 그냥 링크 걸어 둡니다.


2) 파란색으로 된 부분이 아주 기초적인 jquery 입니다.

   아이디가 "s"로 된 text를 찾는 겁니다.


3) 빨간색 말고는 직접 작성해 보세요. 컨트롤C+컨트롤V는 나중에~


4) 여기까지 하시면 html+css+jquery 다 해보셨네요. 참 쉽죠 ~



    <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

    <script type="text/javascript">

      $(document).ready(function(){

        alert( $("#s").text() );

      });

    </script>

    <style>

      body {

        background-color: lightblue;

      }

    </style>

  

  

    <span id="s">hello world</span>

 



끝~!!


이 글을 공유하기

댓글

Designed by JB FACTORY